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: Paolo Bonzini
Subject: Re: tee logs no output if stdout is closed
Date: Fri, 03 Oct 2008 14:18:26 +0200
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

Bruno Haible wrote:
> Paolo Bonzini wrote:
>> Is it possible to implement the "tee
>> --ignore-sigpipe" as you did (delaying SIGPIPE until the last input
>> closes, which I also think is the right thing to do) while having
>> close-stream ignore EPIPE?
> 
> Yes it is. The complete patch was posted here:
> 
>   http://lists.gnu.org/archive/html/bug-coreutils/2008-09/msg00024.html

Doesn't the comment in patch 2

  /* Restore the default SIGPIPE signal handling before exiting.  From
     this point on, we prefer to get a SIGPIPE signal to an EPIPE error,
     since close_stdout interprets EPIPE as a failure condition.  */

... also apply as

  /* Restore the default SIGPIPE signal handling before exiting.  From
     this point on, we prefer to get a SIGPIPE signal to an EPIPE error,
     since close_stdout does not interpret EPIPE as a failure
                        ^^^^^^^^
     condition.  */

?  If so, there would be basically no change in the behavior of tee with
patch 2 applied, no matter if close_stdout fails on EPIPE or not.

Paolo




reply via email to

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