From 98ae15bfb073289e2e65aaf288a83fac71549a9d Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 16 Jan 2006 16:38:25 +0000 Subject: [PATCH] [project @ 2006-01-16 16:38:24 by simonmar] Default signal handlers weren't being installed; amazing that this has been broken ever since I rearranged the signal handling code. --- ghc/includes/RtsConfig.h | 8 ++++++++ ghc/rts/RtsSignals.h | 2 -- ghc/rts/posix/Select.c | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ghc/includes/RtsConfig.h b/ghc/includes/RtsConfig.h index 31cbf7c..76a0209 100644 --- a/ghc/includes/RtsConfig.h +++ b/ghc/includes/RtsConfig.h @@ -78,4 +78,12 @@ #define RET_LBL(f) f##_ret #endif +/* ----------------------------------------------------------------------------- + Signals - supported on non-PAR versions of the runtime. See RtsSignals.h. + -------------------------------------------------------------------------- */ + +#if !defined(PAR) +#define RTS_USER_SIGNALS 1 +#endif + #endif /* RTSCONFIG_H */ diff --git a/ghc/rts/RtsSignals.h b/ghc/rts/RtsSignals.h index 5f7c99b..eafeeaa 100644 --- a/ghc/rts/RtsSignals.h +++ b/ghc/rts/RtsSignals.h @@ -11,12 +11,10 @@ #if !defined(PAR) && !defined(mingw32_HOST_OS) -#define RTS_USER_SIGNALS 1 #include "posix/Signals.h" #elif defined(mingw32_HOST_OS) -#define RTS_USER_SIGNALS 1 #include "win32/ConsoleHandler.h" #else /* PAR */ diff --git a/ghc/rts/posix/Select.c b/ghc/rts/posix/Select.c index 0f7a6df..effc7c4 100644 --- a/ghc/rts/posix/Select.c +++ b/ghc/rts/posix/Select.c @@ -208,7 +208,7 @@ awaitEvent(rtsBool wait) */ #if defined(RTS_USER_SIGNALS) if (signals_pending()) { - startSignalHandlers(); + startSignalHandlers(&MainCapability); return; /* still hold the lock */ } #endif -- 1.7.10.4