diff options
author | Simon Marlow <marlowsd@gmail.com> | 2014-05-14 21:10:06 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2014-05-16 09:52:48 +0100 |
commit | bc7d49a658a516679cc264502e72560c1d2c2314 (patch) | |
tree | c060f23d8f0d4688b0142e3845881ea651890134 | |
parent | 022f8750edf6f413fba31293435dcc62600eab77 (diff) | |
download | haskell-bc7d49a658a516679cc264502e72560c1d2c2314.tar.gz |
Only uninstall signal handlers if they were actually installed (#9068)
Submitted by: tomgr
-rw-r--r-- | rts/RtsStartup.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c index aa7306f88a..15e48a690d 100644 --- a/rts/RtsStartup.c +++ b/rts/RtsStartup.c @@ -355,8 +355,12 @@ hs_exit_(rtsBool wait_foreign) resetTerminalSettings(); #endif - // uninstall signal handlers - resetDefaultHandlers(); +#if defined(RTS_USER_SIGNALS) + if (RtsFlags.MiscFlags.install_signal_handlers) { + // uninstall signal handlers + resetDefaultHandlers(); + } +#endif /* stop timing the shutdown, we're about to print stats */ stat_endExit(); |