[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#34488: Add sort --limit, or document workarounds for sort|head error
From: |
Pádraig Brady |
Subject: |
bug#34488: Add sort --limit, or document workarounds for sort|head error messages |
Date: |
Sun, 17 Feb 2019 18:00:49 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 15/02/19 14:11, Eric Blake wrote:
> On 2/15/19 3:40 PM, Assaf Gordon wrote:
>> Helo,
>>
>> On 2019-02-15 8:20 a.m., Eric Blake wrote:
>>> On 2/15/19 8:43 AM, 積丹尼 Dan Jacobson wrote:
>>>> sort: write failed: 'standard output': Broken pipe
>>>> sort: write error
>> [...]
>>> Perhaps coreutils should teach 'env' a command-line option to forcefully
>>> reset SIGPIPE back to default behavior [...] If we
>>> did that, then even if your sh is started with SIGPIPE ignored (so that
>>> the shell itself can't restore default behavior), you could do this
>>> theoretical invocation:
>>>
>>> $ seq 9999 | env --default-signal PIPE sort -n | sed 5q | wc -l
>>> 5
>>
>> That is a nice idea, I could've used it myself couple of times.
>>
>> Attached a suggested patch.
>> If this seems like a good direction, I'll complete it with NEWS/docs/etc.
>
> Would we also want an easy way to ignore signals? That's a bit less of
> an issue, since you can use 'trap "" $SIG' in the shell; but having the
> symmetry in env may be nice (especially since using 'trap' is asymmetric
> in that you can't force the shell to un-ignore an inherited ignored signal).
I agree that ignore would be nice to add also.
>> Usage is:
>> env --default-signal=PIPE
>> env -P ##shortcut to reset SIGPIPE
BSD has -P for different reasons, so I would avoid that conflict
thanks a lot for working on this guys.
Pádraig
- bug#34488: Add sort --limit, or document workarounds for sort|head error messages, 積丹尼 Dan Jacobson, 2019/02/15
- bug#34488: Add sort --limit, or document workarounds for sort|head error messages, Eric Blake, 2019/02/15
- bug#34488: Add sort --limit, or document workarounds for sort|head error messages, 積丹尼 Dan Jacobson, 2019/02/15
- bug#34488: Add sort --limit, or document workarounds for sort|head error messages, Assaf Gordon, 2019/02/15
- bug#34488: Add sort --limit, or document workarounds for sort|head error messages, Bernhard Voelker, 2019/02/16
- bug#34488: Add sort --limit, or document workarounds for sort|head error messages, 積丹尼 Dan Jacobson, 2019/02/17
- bug#34488: Add sort --limit, or document workarounds for sort|head error messages, Pádraig Brady, 2019/02/17
- bug#34488: Add sort --limit, or document workarounds for sort|head error messages, Assaf Gordon, 2019/02/17
- bug#34488: Add sort --limit, or document workarounds for sort|head error messages, Paul Eggert, 2019/02/17
- bug#34488: Add sort --limit, or document workarounds for sort|head error messages, Assaf Gordon, 2019/02/17
- bug#34488: Add sort --limit, or document workarounds for sort|head error messages, Paul Eggert, 2019/02/17
- bug#34488: Add sort --limit, or document workarounds for sort|head error messages, Pádraig Brady, 2019/02/17
- bug#34488: Add sort --limit, or document workarounds for sort|head error messages, Assaf Gordon, 2019/02/18
- bug#34488: Add sort --limit, or document workarounds for sort|head error messages, Pádraig Brady, 2019/02/24