On Thu, Oct 03, 2024 at 03:19:09PM +0300, Anssi Saari wrote:
> <to...@tuxteam.de> writes:
> 
> > What actually happens seems completely different to me: the shell
> > gets the EPIPE from the dying tee before it can see the EINTR, right?
> 
> That depends. tee -i will ignore SIGINT but ./script gets it. So it can
> keep writing in the pipe, from the script proper or its SIGINT handler
> and exit when it's done and that'll kill tee as well.
> 
> Without -i, tee will die when it gets a SIGINT, the script gets a
> SIGPIPE if it tries to write the pipe now so that would cause the script
> to die before its SIGINT handler can finish.

Yes, we agree. I was talking in the OP's context, where they said they
don't "see" the INT.

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature

Reply via email to