coreutils
[Top][All Lists]
Advanced

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

Re: Enhancement request for tee - please add the option to not quit on S


From: Pádraig Brady
Subject: Re: Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened
Date: Fri, 20 Nov 2015 18:41:19 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 20/11/15 17:38, Jim Meyering wrote:
> On Fri, Nov 20, 2015 at 1:08 PM, Pádraig Brady <address@hidden> wrote:
>> On 20/11/15 02:20, Pádraig Brady wrote:
>>> I'm coming around to making a change here.
>>>
>>> Either be quiet about:
>>>   datagen | tee >(sha1sum --tag) >(md5sum --tag) >&- | sort | gpg 
>>> --clearsign
>>>
>>> Or support:
>>>   datagen | tee --no-stdout >(sha1sum --tag) >(md5sum --tag) | sort | gpg 
>>> --clearsign
>>>
>>> I like the idea of supporting this with no new option.
>>> I see we have similar EBADF handling in touch and nohup.
>>> I'll sleep on it.
>>
>> The attached supports the >&- usage above.
> 
> Doesn't this suppress a diagnostic that is likely to be valuable to anyone who
> accidentally runs an affected tool from a context with closed standard output?

Yes it's not ideal.
Also it doesn't map directly to closed stdout.
If we were to support it then --no-stdout would probably be best.
That would allow symmetric use of processing substitutions also.
i.e. tee --no-stdout >(cmd1) >(cmd2)
rather than the slightly awkward: tee --no-stdout >(cmd1) | cmd2

cheers,
Pádraig



reply via email to

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