#3257: System.Exit.exitWith exits current thread, not program
-----------------------------+----------------------------------------------
Reporter: Bart Massey | Owner:
Type: bug | Status: new
Priority: normal | Component: libraries (other)
Version: 6.10.1 | Severity: minor
Keywords: | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
-----------------------------+----------------------------------------------
The documentation for System.Exit is a bit ambiguous about what the
exitWith function exits from, but IMHO the most natural inference is that
it exits the process from within which it is called. However, it
currently does not necessarily do so; if called from a forkIO'ed thread,
it will raise the exit exception in that thread rather than the "main
thread" of the process.
IMHO it would be best to change this behavior, but failing that it ought
to at least be better documented. For now, I am manually throwing an
!ExitCode to the main thread as a workaround.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3257>
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