coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] tee: Add --pipe-check to allow instantly detecting closed ou


From: Pádraig Brady
Subject: Re: [PATCH] tee: Add --pipe-check to allow instantly detecting closed outputs
Date: Tue, 29 Nov 2022 22:10:51 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.0

On 29/11/2022 21:48, Carl Edquist wrote:
Or perhaps when you mention "inducing SIGPIPE", you are referring to how
tail(1) does things currently (when it detects a broken output), by
attempting raise(SIGPIPE) followed by exit(EXIT_FAILURE).

Yes this is what I was alluding to.

It seems this
is just an attempt to make it look to the waiting parent process that tail
died trying to write to a broken pipe (somewhat of a white lie).  Most
likely it could just exit(EXIT_FAILURE) without confusing the caller.

Right yes we probably should not add this into the mix
and just exit() as tee(1) does now for this case.

... Sorry to see the poll thing is complicated by cross-platform behavior
differences  :(

Yes that is a pain :(

My apologies for the long email...  Hopefully some food for thought! :)

All useful and valid points.
Thanks for taking the time to detail them.

cheers,
Pádraig



reply via email to

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