www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/05/06/06:51:15

Date: Thu, 6 May 1999 13:48:57 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: djgpp-workers AT delorie DOT com
cc: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
Subject: Signals' behavior
Message-ID: <Pine.SUN.3.91.990506134042.15114D-100000@is>
MIME-Version: 1.0
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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019