Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux)
Phillip Susi <address@hidden> writes:
> Andreas Schwab wrote:
>> Bruno Haible <address@hidden> 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, address@hidden
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."