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