From a076248389c82276e079756bee26c011b03f70f2 Mon Sep 17 00:00:00 2001 From: Byron Rakitzis Date: Mon, 7 Mar 1994 00:00:01 +0000 Subject: beta: rc-1.5betadev1 --- exec.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'exec.c') 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, , . 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); } -- cgit v1.2.3