projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ea27d8c
)
Fix #3257: document that exitWith in a forkIO'd thread does not exit the process
author
Simon Marlow
<marlowsd@gmail.com>
Thu, 28 May 2009 12:37:38 +0000
(12:37 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Thu, 28 May 2009 12:37:38 +0000
(12:37 +0000)
System/Exit.hs
patch
|
blob
|
history
diff --git
a/System/Exit.hs
b/System/Exit.hs
index
f4fbac5
..
1e74c1a
100644
(file)
--- a/
System/Exit.hs
+++ b/
System/Exit.hs
@@
-57,7
+57,12
@@
import System
-- be caught using the functions of "Control.Exception". This means
-- that cleanup computations added with 'Control.Exception.bracket'
-- (from "Control.Exception") are also executed properly on 'exitWith'.
-- be caught using the functions of "Control.Exception". This means
-- that cleanup computations added with 'Control.Exception.bracket'
-- (from "Control.Exception") are also executed properly on 'exitWith'.
-
+--
+-- Note: in GHC, 'exitWith' should be called from the main program
+-- thread in order to exit the process. When called from another
+-- thread, 'exitWith' will throw an 'ExitException' as normal, but the
+-- exception will not cause the process itself to exit.
+--
#ifndef __NHC__
exitWith :: ExitCode -> IO a
exitWith ExitSuccess = throwIO ExitSuccess
#ifndef __NHC__
exitWith :: ExitCode -> IO a
exitWith ExitSuccess = throwIO ExitSuccess