X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=ghc%2Fruntime%2Fmain%2Fmain.lc;h=1eee1ff0d1c115ebf98d730eaa2bca926cc4b16a;hb=64a0e7e34b2337eae813ebfe4e0d130de25c7122;hp=e4889eb5b92207a5b812c67971d4067fc16f30a6;hpb=609e5ea8dfd9c6a90db80de13764230dafc49466;p=ghc-hetmet.git diff --git a/ghc/runtime/main/main.lc b/ghc/runtime/main/main.lc index e4889eb..1eee1ff 100644 --- a/ghc/runtime/main/main.lc +++ b/ghc/runtime/main/main.lc @@ -342,6 +342,11 @@ shutdownHaskell(STG_NO_ARGS) if (RTSflags.TickyFlags.showTickyStats) PrintTickyInfo(); #endif + /* Give the application a chance to do something sensible + on-exit + */ + OnExitHook(); + fflush(stdout); /* This fflush is important, because: if "main" just returns, then we will end up in pre-supplied exit code that will close