[commit: ghc] ghc-7.8: Only uninstall signal handlers if they were actually installed (#9068) (1456326)

git at git.haskell.org git at git.haskell.org
Tue Jun 3 13:45:47 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-7.8
Link       : http://ghc.haskell.org/trac/ghc/changeset/145632625651deb4a6f8758e838cfbefc32c9096/ghc

>---------------------------------------------------------------

commit 145632625651deb4a6f8758e838cfbefc32c9096
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Wed May 14 21:10:06 2014 +0100

    Only uninstall signal handlers if they were actually installed (#9068)
    
    Submitted by: tomgr
    
    (cherry picked from commit bc7d49a658a516679cc264502e72560c1d2c2314)


>---------------------------------------------------------------

145632625651deb4a6f8758e838cfbefc32c9096
 rts/RtsStartup.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c
index aa7306f..15e48a6 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();



More information about the ghc-commits mailing list