Riddle me on this one
D. Hugh Redelmeier
hugh-pmF8o41NoarQT0dZR+AlfA at public.gmane.org
Mon Jan 23 22:30:27 UTC 2012
| From: William Park <opengeometry-FFYn/CNdgSA at public.gmane.org>
| Hmm... as one who likes to do a lot in signal handler (simply because
| it's nicely separated from main program), how much is too much?
I've simplified this in my mind, and I'm too lazy to look it up, but roughly:
- no library routines can be safely called because none is guaranteed
to be re-entrant. I seem to remember that longjmp and __exit might
be exceptions. Oh, and signalaction, I guess.
- if a variable is shared between a signal handler and any other code,
it must be declared volatile and its type must be atomic_t.
That leaves very little that you can do safely.
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list