From 10ba2ab9fb729215f5e30654527a5d882a3a01f7 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Wed, 4 Jul 2007 12:36:06 +0000 Subject: [PATCH] We don't need a SIGCONT handler any more The SIGCONT handler was used to put stdin back in O_NONBLOCK mode, after the process is resumed, but we don't want to do that now: the standard handles are kept in blocking mode. --- rts/posix/Signals.c | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/rts/posix/Signals.c b/rts/posix/Signals.c index abbb97a..a902b80 100644 --- a/rts/posix/Signals.c +++ b/rts/posix/Signals.c @@ -164,22 +164,6 @@ StgPtr *next_pending_handler = pending_handler_buf; #endif /* THREADED_RTS */ /* ----------------------------------------------------------------------------- - * SIGCONT handler - * - * It seems that shells tend to put stdin back into blocking mode - * following a suspend/resume of the process. Here we arrange to put - * it back into non-blocking mode. We don't do anything to - * stdout/stderr because these handles don't get put into non-blocking - * mode at all - see the comments on stdout/stderr in PrelHandle.hsc. - * -------------------------------------------------------------------------- */ - -static void -cont_handler(int sig STG_UNUSED) -{ - setNonBlockingFd(0); -} - -/* ----------------------------------------------------------------------------- * Low-level signal handler * * Places the requested handler on a stack of pending handlers to be @@ -249,11 +233,6 @@ generic_handler(int sig) sigaddset(&signals, sig); sigprocmask(SIG_UNBLOCK, &signals, NULL); - // *always* do the SIGCONT handler, even if the user overrides it. - if (sig == SIGCONT) { - cont_handler(sig); - } - context_switch = 1; } @@ -514,14 +493,6 @@ initDefaultHandlers() siginterrupt(SIGINT, 1); // isn't this the default? --SDM #endif - // install the SIGCONT handler - action.sa_handler = cont_handler; - sigemptyset(&action.sa_mask); - action.sa_flags = 0; - if (sigaction(SIGCONT, &action, &oact) != 0) { - sysErrorBelch("warning: failed to install SIGCONT handler"); - } - // install the SIGFPE handler // In addition to handling SIGINT, also handle SIGFPE by ignoring it. -- 1.7.10.4