coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] split: return success even if a --filter exits


From: Jim Meyering
Subject: Re: [PATCH] split: return success even if a --filter exits
Date: Sat, 21 May 2011 11:05:10 +0200

Pádraig Brady wrote:
> I notice that split --filter spuriously returned with
> status 141 just because the filter finished early.
> This is a fairly good way to reproduce:
>
> yes | head -n200K | split -b1G --filter='head -c1 >/dev/null'
>
> I avoided this by not unblocking SIGPIPEs before
> calling closeout(), which just lets any pending SIGPIPEs through.
> I can't see why we would need to unblock them.
...
> Subject: [PATCH] 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.

Nice.  Thank you!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]