Hello,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. 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.
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.