[GHC] #7229: Detecting if a process was killed by a signal is impossible

GHC cvs-ghc at haskell.org
Thu Sep 27 12:39:56 CEST 2012


#7229: Detecting if a process was killed by a signal is impossible
----------------------------------+-----------------------------------------
    Reporter:  benmachine         |       Owner:                  
        Type:  bug                |      Status:  new             
    Priority:  high               |   Milestone:  7.6.2           
   Component:  libraries/process  |     Version:                  
    Keywords:                     |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple   |     Failure:  None/Unknown    
  Difficulty:  Unknown            |    Testcase:                  
   Blockedby:                     |    Blocking:                  
     Related:                     |  
----------------------------------+-----------------------------------------

Comment(by andersk):

 Actually, passing a signal to `exitWith` would make perfect sense as a way
 to re-raise the same signal.  This is what bash does when its last child
 (or with `-e`, any child) is terminated, for example.  If `ExitCode` won’t
 change, a portable `exitWithStatus :: ExitStatus -> IO a` that’s capable
 of re-raising the same signal on Unix would be useful.

 Can we use `CInt` instead of `Int` so that comparing with constants in
 System.Posix.Signals doesn’t require a cast?  Or just arrange for
 `ExitStatus` to be the same as `System.Posix.Process.ProcessStatus` when
 applicable?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7229#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the Glasgow-haskell-bugs mailing list