Mail Archives: djgpp-workers/1999/05/06/06:51:15
The ANSI C89 Standard says that before a signal handler is invoked, the
implementation should either revert that signal to SIG_DFL or to block
it. The C9X draft seems to uphold this ruling as well (a quote from C9X
para 7.14 is attached below).
It seems that our implementation does neither of these two. Should we?
An excerpt from C9X draft, para 7.14:
[#3] When a signal occurs and func points to a function, it
is implementation-defined whether the equivalent of
signal(sig, SIG_DFL); is executed or the implementation
prevents some implementation-defined set of signals (at
least including sig) from occurring until the current signal
handling has completed; in the case of SIGILL, the
implementation may alternatively define that no action is
taken. Then the equivalent of (*func)(sig); is executed.
If and when the function returns, if the value of sig is
SIGFPE, SIGILL, SIGSEGV, or any other implementation-defined
value corresponding to a computational exception, the
behavior is undefined; otherwise the program will resume
execution at the point it was interrupted.
- Raw text -