diff options
author | cracauer <cracauer@FreeBSD.org> | 1999-04-21 11:52:39 +0000 |
---|---|---|
committer | cracauer <cracauer@FreeBSD.org> | 1999-04-21 11:52:39 +0000 |
commit | da2b842fad6cd6feb408c139a13b6da10a8ffbc5 (patch) | |
tree | 84a311efb1fdc9d20cd0218f25bee08ff1aa36e0 /bin/sh/eval.c | |
parent | d9c00667012aae534fe05e09eeff108a46bf3307 (diff) | |
download | FreeBSD-src-da2b842fad6cd6feb408c139a13b6da10a8ffbc5.zip FreeBSD-src-da2b842fad6cd6feb408c139a13b6da10a8ffbc5.tar.gz |
Next approach to make loops in interactive interruptable.
PR: bin/9173
Diffstat (limited to 'bin/sh/eval.c')
-rw-r--r-- | bin/sh/eval.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/bin/sh/eval.c b/bin/sh/eval.c index 36552c4..7bf92b2 100644 --- a/bin/sh/eval.c +++ b/bin/sh/eval.c @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)eval.c 8.9 (Berkeley) 6/8/95"; #endif static const char rcsid[] = - "$Id: eval.c,v 1.16 1999/04/01 13:27:35 cracauer Exp $"; + "$Id: eval.c,v 1.17 1999/04/03 12:55:51 cracauer Exp $"; #endif /* not lint */ #include <signal.h> @@ -410,7 +410,7 @@ evalsubshell(n, flags) } if (! backgnd) { INTOFF; - exitstatus = waitforjob(jp); + exitstatus = waitforjob(jp, (int *)NULL); INTON; } } @@ -509,7 +509,7 @@ evalpipe(n) INTON; if (n->npipe.backgnd == 0) { INTOFF; - exitstatus = waitforjob(jp); + exitstatus = waitforjob(jp, (int *)NULL); TRACE(("evalpipe: job done exit status %d\n", exitstatus)); INTON; } @@ -602,6 +602,7 @@ evalcommand(cmd, flags, backcmd) struct localvar *volatile savelocalvars; volatile int e; char *lastarg; + int realstatus; #if __GNUC__ /* Avoid longjmp clobbering */ (void) &argv; @@ -861,9 +862,9 @@ cmddone: parent: /* parent process gets here (if we forked) */ if (mode == 0) { /* argument to fork */ INTOFF; - exitstatus = waitforjob(jp); + exitstatus = waitforjob(jp, &realstatus); INTON; - if (iflag && loopnest > 0 && WIFSIGNALED(exitstatus)) { + if (iflag && loopnest > 0 && WIFSIGNALED(realstatus)) { evalskip = SKIPBREAK; skipcount = loopnest; } |