Messages in this thread |  | | | Date | Fri, 06 Nov 2009 17:09:50 -0600 | | From | "Chris Friesen" <> | | Subject | simultaneous signal handling and setjmp/longjmp |
I've got a bit of an odd hypothetical question dealing with signals and setjmp/longjmp.
Suppose we have an app with multiple signals pending. (Say, SIGALRM and SIGSEGV.) In the signal handler for SIGSEGV, we're going to call call longjmp(). (Yes, I'm aware of the issues.)
At this point we're still in the kernel and both SIGSEGV and SIGALARM are pending. What happens?
If we run the SIGSEGV handler does the SIGALARM stay pending until the segfault handler completes? What happens when the segfault handler calls longjmp()? Does the SIGALARM handler get called on the logical return from sigsetjmp(), and if so how does that happen since the glibc code for setjmp/longjmp doesn't seem to call any kernel syscalls?
Thanks for any information you can provide...
Chris
|  |