Skip to contentSkip to conversation

signal interface: SIGINFO and sa_sigaction

Linux-ia64 [email protected] 4 participants 5 messages Jun 14, 2000 – Jun 15, 2000

lore
Share & tools
lore
#0 lore raw

Hello,

I am porting some applications over from Linux x86 to IA64, and run into problem with the signals - It seems to me that the IA64 kernel hasn't implement the sa_sigaction interface for singal handlers - which, according to the man page, should be implemented for Kernel 2.1.86. Just wonder whether the IA64 kernel will be done up to support it?

-x-
Sunny Chan
Java Technology Center,
Mail Point 146, IBM UK, Hursley Park, Winchester, England SO21 2JN

Notes ID: Sunny Chan/UK/IBM
Email: [email protected]
Telephones: Internal: 246762 External: 01962 816762 Mobile: 07887-704088

#1 lore raw

Yes, I see what you mean. It looks like the glibc header file doesn't define sa_sigaction as a (properly typed) synonym of sa_handler. Jes, can you fix this? It looks to me that the IA-64 "struct sigaction" should be defined like in sysdeps/unix/sysv/linux/bits/sigaction.h.

Note that from the kernel perspective, there is no difference between sa_handler and sa_sigaction. So as a quick workaround, you can simply use sa_handler with the appropriate type cast.

	--david
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · On Wed, 14 Jun 2000 17:04:41 +0100, [email protected] said:

Sunny> Hello,

Sunny> I am porting some applications over from Linux x86 to IA64, Sunny> and run into problem with the signals - It seems to me that Sunny> the IA64 kernel hasn't implement the sa_sigaction interface Sunny> for singal handlers - which, according to the man page, Sunny> should be implemented for Kernel 2.1.86. Just wonder whether Sunny> the IA64 kernel will be done up to support it?

#2 lore raw
In reply to [email protected]
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"David" = David Mosberger <[email protected]> writes:

David> Yes, I see what you mean. It looks like the glibc header file David> doesn't define sa_sigaction as a (properly typed) synonym of David> sa_handler. Jes, can you fix this? It looks to me that the David> IA-64 "struct sigaction" should be defined like in David> sysdeps/unix/sysv/linux/bits/sigaction.h.

I'll make sure it gets fixed in glibc-2.2

Jes

#3 lore raw
In reply to [email protected]
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · On Thu, 15 Jun 2000 16:28:42 +0100, [email protected] said:

Sunny> But then the sa_sigaction function does require kernel to Sunny> call the handler with parameters (struct siginfo_t), if I Sunny> just patch the struct sigaction, will the other pieces of Sunny> kernel signal handling routine render those parameters and Sunny> pass it to the signal handler? - I am not an kernel expert, Sunny> so information is really appericated!

The kernel _always_ passes siginfo and sigcontext as the second and third arguments to a signal handler. sa_sigaction is just syntactic sugar.

	--david
#4 lore raw
In reply to [email protected]
Quoted 3 lines · David Mosberger

Yes, I see what you mean. It looks like the glibc header file doesn't define sa_sigaction as a (properly typed) synonym of sa_handler. Jes, can you fix this?

I changed this already in my version of the tree before checking it in.

Signature · 3 lines
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------