#2301: Proper handling of SIGINT/SIGQUIT
----------------------------------+-----------------------------------------
    Reporter:  duncan             |        Owner:                  
        Type:  bug                |       Status:  new             
    Priority:  normal             |    Milestone:  6.12.1          
   Component:  libraries/process  |      Version:  6.8.2           
    Severity:  normal             |   Resolution:                  
    Keywords:                     |   Difficulty:  Unknown         
    Testcase:                     |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple   |  
----------------------------------+-----------------------------------------
Comment (by diego):

 Replying to [comment:2 simonmar]:
 >
 >   1619: we now ignore SIGPIPE by default.  Although POSIX says that a
 >   SIGPIPE should terminate the process by default, I wonder if this
 >   decision was made because many C applications failed to check the exit
 >   code from write().  In Haskell a failed write due to a closed pipe
 >   will generate an exception anyway, so the main difference is that we
 >   now get a useful error message instead of silent program termination.
 >   See #1619 for more discussion.
 >

 And when describing exec POSIX says:
 > Signals set to the default action (SIG_DFL) in the calling process image
 shall be set to the default action in the new process image.
 > Except for SIGCHLD, signals set to be ignored (SIG_IGN) by the calling
 process image shall be set to be ignored by the new process image.
 > Signals set to be caught by the calling process image shall be set to
 the default action in the new process image (see <signal.h>).

 Thus, to avoid breaking applications that rely on the the default handler
 of SIGPIPE the RTS should restore the handler before starting new
 processes.

 I can't say how many applications are affected by this nowadays. Simple
 applications may rely on default bahavior of signals. But it seems to be a
 minor issue.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2301#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to