summaryrefslogtreecommitdiffstats
path: root/contrib/tcsh/tc.sig.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tcsh/tc.sig.c')
-rw-r--r--contrib/tcsh/tc.sig.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/contrib/tcsh/tc.sig.c b/contrib/tcsh/tc.sig.c
index 343754f..92bc798 100644
--- a/contrib/tcsh/tc.sig.c
+++ b/contrib/tcsh/tc.sig.c
@@ -1,4 +1,4 @@
-/* $Header: /p/tcsh/cvsroot/tcsh/tc.sig.c,v 3.36 2006/08/24 20:56:31 christos Exp $ */
+/* $Header: /p/tcsh/cvsroot/tcsh/tc.sig.c,v 3.40 2012/01/25 15:34:41 christos Exp $ */
/*
* tc.sig.c: Signal routine emulations
*/
@@ -32,7 +32,7 @@
*/
#include "sh.h"
-RCSID("$tcsh: tc.sig.c,v 3.36 2006/08/24 20:56:31 christos Exp $")
+RCSID("$tcsh: tc.sig.c,v 3.40 2012/01/25 15:34:41 christos Exp $")
#include "tc.wait.h"
@@ -60,26 +60,38 @@ int alrmcatch_disabled; /* = 0; */
int phup_disabled; /* = 0; */
int pchild_disabled; /* = 0; */
int pintr_disabled; /* = 0; */
+int handle_interrupt; /* = 0; */
-void
+int
handle_pending_signals(void)
{
+ int rv = 0;
if (!phup_disabled && phup_pending) {
phup_pending = 0;
+ handle_interrupt++;
phup();
+ handle_interrupt--;
}
if (!pintr_disabled && pintr_pending) {
pintr_pending = 0;
+ handle_interrupt++;
pintr();
+ handle_interrupt--;
+ rv = 1;
}
if (!pchild_disabled && pchild_pending) {
pchild_pending = 0;
+ handle_interrupt++;
pchild();
+ handle_interrupt--;
}
if (!alrmcatch_disabled && alrmcatch_pending) {
alrmcatch_pending = 0;
+ handle_interrupt++;
alrmcatch();
+ handle_interrupt--;
}
+ return rv;
}
void
OpenPOWER on IntegriCloud