[PATCH] split: return success even if a --filter exits
From:
Pádraig Brady
Subject:
[PATCH] split: return success even if a --filter exits
Date:
Fri, 20 May 2011 00:40:06 +0100
User-agent:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3
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.
cheers,
Pádraig.