public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* simultaneous signal handling and setjmp/longjmp
@ 2009-11-06 23:09 Chris Friesen
  0 siblings, 0 replies; only message in thread
From: Chris Friesen @ 2009-11-06 23:09 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-06 23:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-06 23:09 simultaneous signal handling and setjmp/longjmp Chris Friesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox