summaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorByron Rakitzis <byron@archone.tamu.edu>1994-03-07 00:00:01 +0000
committerToby Goodwin <toby@paccrat.org>2015-05-16 21:22:09 +0100
commita076248389c82276e079756bee26c011b03f70f2 (patch)
tree9d22c48c75bcd778f30cbb2e37b6dff6abb4f1d2 /exec.c
parent6bb38f6a01dbf4bbd584e038ceace0a00faa27bb (diff)
beta: rc-1.5betadev1
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/exec.c b/exec.c
index 38d627c..8ed8ead 100644
--- a/exec.c
+++ b/exec.c
@@ -110,9 +110,20 @@ extern void exec(List *s, bool parent) {
redirq = NULL;
rc_wait4(pid, &stat, TRUE);
setstatus(-1, stat);
+ /*
+ There is a very good reason for having this weird
+ nl_on_intr variable: when rc and its child both
+ process a SIGINT, (i.e., the child has a SIGINT
+ catcher installed) then you don't want rc to print
+ a newline when the child finally exits. Here's an
+ example: ed, <type ^C>, <type "q">. rc does not
+ and should not print a newline before the next
+ prompt, even though there's a SIGINT in its signal
+ vector.
+ */
if ((stat & 0xff) == 0)
nl_on_intr = FALSE;
- SIGCHK;
+ sigchk();
nl_on_intr = TRUE;
pop_cmdarg(TRUE);
}