[project @ 2005-01-23 20:20:55 by wolfgang]
authorwolfgang <unknown>
Sun, 23 Jan 2005 20:20:55 +0000 (20:20 +0000)
committerwolfgang <unknown>
Sun, 23 Jan 2005 20:20:55 +0000 (20:20 +0000)
Flush stdout and stderr also when exiting due to an ExitException.

GHC/TopHandler.lhs

index 6082a03..7e5bca4 100644 (file)
@@ -64,8 +64,8 @@ real_handler ex =
           safeExit 2
 
        -- only the main thread gets ExitException exceptions
-       ExitException ExitSuccess     -> safeExit 0
-       ExitException (ExitFailure n) -> safeExit n
+       ExitException ExitSuccess     -> cleanUp >> safeExit 0
+       ExitException (ExitFailure n) -> cleanUp >> safeExit n
 
        other -> do
           reportError other