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

GHC ghc-devs at haskell.org
Sat Nov 9 08:12:58 UTC 2013


#7229: Detecting if a process was killed by a signal is impossible
--------------------------------------+------------------------------------
        Reporter:  benmachine         |            Owner:
            Type:  bug                |           Status:  new
        Priority:  high               |        Milestone:  7.8.1
       Component:  libraries/process  |          Version:
      Resolution:                     |         Keywords:
Operating System:  Unknown/Multiple   |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown       |       Difficulty:  Unknown
       Test Case:                     |       Blocked By:
        Blocking:                     |  Related Tickets:
--------------------------------------+------------------------------------

Comment (by hvr):

 Replying to [comment:6 simonmar]:
 > Unfortunately we can't add the right information to `ExitCode`, because
 it is a platform-independent type.  The correct type already exists: it is
 called `System.Posix.ProcessStatus`.
 >
 > {{{#!hs
 > data ProcessStatus = Exited ExitCode
 >                    | Terminated Signal
 >                    | Stopped Signal
 >                  deriving (Eq, Ord, Show)
 > }}}
 >
 > Unfortunately whoever wrote this forgot to add a `Bool` to indicate a
 core dump in the `Terminated` constructor.  We *could* fix that.

 for the record, this has been implemented in
 [dc29d55b30d95f0838499fb48217e1d22e39d07d/unix] (which is included in the
 recently released [hackage:unix-2.7.0.0])

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


More information about the ghc-tickets mailing list