Date: Thu, 6 May 1999 13:48:57 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: djgpp-workers AT delorie DOT com cc: Charles Sandmann Subject: Signals' behavior Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com 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.