[haiku-development] Re: [RFC] sigaction SA_SIGINFO support

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 12 Aug 2008 12:54:56 +0200

On 2008-08-12 at 01:37:49 [+0200], Andreas Färber <andreas.faerber@xxxxxx> 
wrote:
> 
> As discussed earlier, Haiku currently has BeOS-compatible signal
> handlers, which double as basic POSIX-compliant signal handlers.
> Attached is a patch which attempts to add support for POSIX-style
> signal handlers that provide extended information on the signal and
> context. The SA_SIGINFO flag is used to distinguish, as pointed out by
> François.
> 
> This is still work in progress, I'm posting it to check whether I'm on
> the right track there. I've tested it in a gcc4 image with ftp and
> vim. Not yet tested with the signal test apps, not in a gcc2 image and
> not the new code path. I have however checked (via panic) that the new
> codepath was not taken by accident.

Looks good so far.

> What is still missing is a lot of
> info in the siginfo_t struct, which isn't currently available (new
> SA_SIGINFO code path only). I was thinking we could use the siginfo_t
> as argument to arch_setup_signal_frame maybe, to get at that data.

That wouldn't help, since some info simply isn't available (like the 
sender). We'd have to add realtime signal support to get those.

> What might be applied already is the new ucontext.h header, defining
> ucontext_t. For its mcontext_t member I've reused BeOS' struct vregs
> for simplicity for now.

I guess that's OK.

CU, Ingo

Other related posts: