[GHC] #2301: Proper handling of SIGINT/SIGQUIT
GHC
ghc-devs at haskell.org
Thu Nov 14 23:41:21 UTC 2013
#2301: Proper handling of SIGINT/SIGQUIT
-------------------------------------+-------------------------------------
Reporter: duncan | Owner:
Type: bug | Status: new
Priority: high | Milestone: 7.8.1
Component: | Version: 6.12.3
libraries/process | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: POSIX | Difficulty: Unknown
Type of failure: Incorrect result | Blocked By:
at runtime | Related Tickets:
Test Case: | #3994,#5766,#7229,#4274,#3318,#1619
Blocking: |
-------------------------------------+-------------------------------------
Comment (by duncan):
I have a patch to fix this.
It adds a new `delegate_ctlc :: Bool` to the `CreateProcess` options
record for delegating control C handling. If you turn that on, then
`createProcess` will make the parent process ignore SIGINT until
`waitForProcess` returns (or `getProcessExitCode` returns non-Nothing).
Then `waitForProcess` (or `getProcessExitCode`) will throw `UserInterrupt`
if we were delegating, and the process did exit due to SIGINT. This should
implement the "WCE" protocol ok.
It should correctly handle the case of there being multiple concurrent
processes to which we're delegating (unlike the current
`system`/`rawSystem` which will end up with the wrong signal handlers
installed).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/2301#comment:34>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list