bug-gnulib
[Top][All Lists]
Advanced

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

Re: tee logs no output if stdout is closed


From: Jim Meyering
Subject: Re: tee logs no output if stdout is closed
Date: Fri, 03 Oct 2008 14:59:49 +0200

Paolo Bonzini <address@hidden> wrote:

> Jim Meyering wrote:
>
>>>>>> Imagine a scenario in which the pipe reader is expected always to
>>>>>> be reading, and so the pipe writer can expect that any write failure with
>>>>>> errno==EPIPE indicates the reader has terminated unexpectedly.
>>>>
>>>> The above was assuming that SIGPIPE is being ignored.
>>>
>>> But if you need it, what's wrong with un-ignoring it?
>>
>> [we're getting far afield, but... ]
>
> Not really: if the only reason not to have close_stdout ignore EPIPE is
> a bug in a fringe shell on a mis-configured system, then:

No, no, no ;-)
That was just explaining my comment that ignoring
SIGPIPE is not recommended (in some contexts).

> - either you don't care, despite the "trouble to reproduce and
> diagnose", and you make it fail silently
>
> - or you work around it by unignoring SIGPIPE.
>
> I'd prefer to have EPIPE ignored, so I can prepare a patch to most
> coreutils for (2) if you wish.

I'm pretty sure that would be contrary to POSIX.




reply via email to

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