diff options
| author | Jilles Tjoelker <jilles@FreeBSD.org> | 2012-02-24 12:35:17 +0000 |
|---|---|---|
| committer | Jilles Tjoelker <jilles@FreeBSD.org> | 2012-02-24 12:35:17 +0000 |
| commit | 23583c4fe122ebaebadb95162edd18a40d5eb963 (patch) | |
| tree | ecac441a221214d268993d6b61b1e7e6f9157c0e /usr.bin/xargs | |
| parent | 4f23e905a3885e9b163a8e26a9334810796f1561 (diff) | |
Notes
Diffstat (limited to 'usr.bin/xargs')
| -rw-r--r-- | usr.bin/xargs/xargs.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/xargs/xargs.c b/usr.bin/xargs/xargs.c index 09548002f8998..35d07c7314305 100644 --- a/usr.bin/xargs/xargs.c +++ b/usr.bin/xargs/xargs.c @@ -281,7 +281,7 @@ parse_input(int argc, char *argv[]) case EOF: /* No arguments since last exec. */ if (p == bbp) { - waitchildren(*argv, 1); + waitchildren(*av, 1); exit(rval); } goto arg1; @@ -368,7 +368,7 @@ arg2: } prerun(argc, av); if (ch == EOF || foundeof) { - waitchildren(*argv, 1); + waitchildren(*av, 1); exit(rval); } p = bbp; @@ -608,8 +608,11 @@ waitchildren(const char *name, int waitall) * If utility signaled or exited with a value of 255, * exit 1-125. */ - if (WIFSIGNALED(status) || WEXITSTATUS(status) == 255) - exit(1); + if (WIFSIGNALED(status)) + errx(1, "%s: terminated with signal %d, aborting", + name, WTERMSIG(status)); + if (WEXITSTATUS(status) == 255) + errx(1, "%s: exited with status 255, aborting", name); if (WEXITSTATUS(status)) rval = 1; } |
