Add an --install-signal-handlers=<yes|no> RTS flag; fixes trac #804
[ghc-hetmet.git] / rts / posix / Select.c
index ccf3945..57599bc 100644 (file)
@@ -10,6 +10,7 @@
 /* #include "PosixSource.h" */
 
 #include "Rts.h"
+#include "Storage.h"
 #include "Schedule.h"
 #include "RtsUtils.h"
 #include "RtsFlags.h"
@@ -207,7 +208,7 @@ awaitEvent(rtsBool wait)
           * serviced.
           */
 #if defined(RTS_USER_SIGNALS)
-         if (signals_pending()) {
+         if (RtsFlags.MiscFlags.install_signal_handlers && signals_pending()) {
              startSignalHandlers(&MainCapability);
              return; /* still hold the lock */
          }