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