From: wolfgang Date: Sun, 23 Jan 2005 20:20:55 +0000 (+0000) Subject: [project @ 2005-01-23 20:20:55 by wolfgang] X-Git-Tag: nhc98-1-18-release~80 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=659db5a16100b288ca3dc33d936d91a22423948e;p=haskell-directory.git [project @ 2005-01-23 20:20:55 by wolfgang] Flush stdout and stderr also when exiting due to an ExitException. --- diff --git a/GHC/TopHandler.lhs b/GHC/TopHandler.lhs index 6082a03..7e5bca4 100644 --- a/GHC/TopHandler.lhs +++ b/GHC/TopHandler.lhs @@ -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