From: Benjamin R. <Ben...@ep...> - 2003-03-14 12:08:25
|
Hi Ranjit, "Ranjit Mathew" <rma...@ho...> writes: > I thought so too, until very recently. It seems that ANSI C > specifically allows longjmp( ) in a signal handler if it is not > a nested handler: C99 has this to say about that at 7.14.1.1, paragraph 5: >>>>> If the signal occurs other than as the result of calling the abort or raise function, the behavior is undefined if [...] the signal handler calls any function in the standard library other than the abort function, the _Exit function, [...] <<<<< C89 explicitly mentions and allows longjmp() (and exit() and abort()), but only in the case that the signal was caused by calling the abort() or raise() functions. C99 drops that and doesn't seem to restrict this kind of signal handler. That doesn't change the situation for signals that are not cause by abort() or raise(). so long, benny |