diff options
| author | Martin Cracauer <cracauer@FreeBSD.org> | 1999-04-03 12:55:51 +0000 |
|---|---|---|
| committer | Martin Cracauer <cracauer@FreeBSD.org> | 1999-04-03 12:55:51 +0000 |
| commit | 4487495433ec4a2311c310562d086bc4805859c9 (patch) | |
| tree | e5a65349aca46c46cd0a4a576171b994cc15c24d /bin | |
| parent | 0b19fc6d3f5c0ee9709af9c2b95097e716ede8e4 (diff) | |
Notes
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/sh/eval.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/sh/eval.c b/bin/sh/eval.c index 8b4fb62fba22..36552c4403c3 100644 --- a/bin/sh/eval.c +++ b/bin/sh/eval.c @@ -39,11 +39,12 @@ static char sccsid[] = "@(#)eval.c 8.9 (Berkeley) 6/8/95"; #endif static const char rcsid[] = - "$Id: eval.c,v 1.15 1998/05/18 06:43:34 charnier Exp $"; + "$Id: eval.c,v 1.16 1999/04/01 13:27:35 cracauer Exp $"; #endif /* not lint */ #include <signal.h> #include <unistd.h> +#include <sys/wait.h> /* For WIFSIGNALED(status) */ /* * Evaluate a command. @@ -862,6 +863,10 @@ parent: /* parent process gets here (if we forked) */ INTOFF; exitstatus = waitforjob(jp); INTON; + if (iflag && loopnest > 0 && WIFSIGNALED(exitstatus)) { + evalskip = SKIPBREAK; + skipcount = loopnest; + } } else if (mode == 2) { backcmd->fd = pip[0]; close(pip[1]); |
