summaryrefslogtreecommitdiff
path: root/rts/RtsStartup.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2014-05-14 21:10:06 +0100
committerSimon Marlow <marlowsd@gmail.com>2014-05-16 09:52:48 +0100
commitbc7d49a658a516679cc264502e72560c1d2c2314 (patch)
treec060f23d8f0d4688b0142e3845881ea651890134 /rts/RtsStartup.c
parent022f8750edf6f413fba31293435dcc62600eab77 (diff)
downloadhaskell-bc7d49a658a516679cc264502e72560c1d2c2314.tar.gz
Only uninstall signal handlers if they were actually installed (#9068)
Submitted by: tomgr
Diffstat (limited to 'rts/RtsStartup.c')
-rw-r--r--rts/RtsStartup.c8
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();