Phillip Susi <[EMAIL PROTECTED]> writes:

> Andreas Schwab wrote:
>> Bruno Haible <[EMAIL PROTECTED]> writes:
>>
>>> How about adding an option '-p' to 'tee', that causes it to ignore SIGPIPE
>>> while writing to stdout?
>>
>> Just add a trap '' SIGPIPE before starting tee.
>
> Wouldn't that only trap SIGPIPE sent to the shell, not tee?

Ignored signals are inherited.

> Aren't all signal handlers reset on exec()?

Only handled signals.

> It seems to me that tee should have a SIGPIPE handler which closes the
> broken fd and stops trying to write to it, and if ALL outputs have been
> closed, exit.

That would not be compatible with POSIX.

Andreas.

-- 
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to