X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FRtsStartup.c;h=b9442d2bd5744b3eb6a1c433ebbff07c6f598bf2;hb=73e88c2a30cbb2fc9cf8c394c620c0f3edcdd0eb;hp=6abeb404a073bb128c861ff4564a844f77758f77;hpb=6c095bfa3c8c81b52ad92853acd326453d320d7b;p=ghc-hetmet.git diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c index 6abeb40..b9442d2 100644 --- a/rts/RtsStartup.c +++ b/rts/RtsStartup.c @@ -402,12 +402,6 @@ hs_exit_(rtsBool wait_foreign) OnExitHook(); -#if defined(RTS_USER_SIGNALS) - if (RtsFlags.MiscFlags.install_signal_handlers) { - freeSignalHandlers(); - } -#endif - #if defined(THREADED_RTS) ioManagerDie(); #endif @@ -418,6 +412,12 @@ hs_exit_(rtsBool wait_foreign) /* run C finalizers for all active weak pointers */ runAllCFinalizers(weak_ptr_list); +#if defined(RTS_USER_SIGNALS) + if (RtsFlags.MiscFlags.install_signal_handlers) { + freeSignalHandlers(); + } +#endif + #if defined(GRAN) /* end_gr_simulation prints global stats if requested -- HWL */ if (!RtsFlags.GranFlags.GranSimStats.Suppressed)