diff options
author | Pádraig Brady <P@draigBrady.com> | 2011-05-19 23:23:23 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2011-05-26 00:10:32 +0100 |
commit | 5908e29e825286121c69f5c10c313ccae6860fa7 (patch) | |
tree | 27612890659fa217afe24a0ffd314d93308852ef /tests/split | |
parent | d92849fe5a9c8a24203f70b02806737666cb980b (diff) | |
download | coreutils-5908e29e825286121c69f5c10c313ccae6860fa7.tar.xz |
split: return success even if a --filter exits
src/split.c (main): Don't unblock SIGPIPE before cleanup,
as then any pending signals will be sent and cause
the main split process to exit with a non zero status (141).
* test/split/filter: Add a test for this case.
Diffstat (limited to 'tests/split')
-rwxr-xr-x | tests/split/filter | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/split/filter b/tests/split/filter index 4c25c5fcd..0614841ed 100755 --- a/tests/split/filter +++ b/tests/split/filter @@ -43,4 +43,8 @@ done split -e -n 10 --filter='xz > $FILE.xz' /dev/null || fail=1 stat x?? 2>/dev/null && fail=1 +# Ensure SIGPIPEs sent by the children don't propagate back +# where they would result in a non zero exit from split. +yes | head -n200K | split -b1G --filter='head -c1 >/dev/null' || fail=1 + Exit $fail |