Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: named pipes blocking zsh

What's interesting is that if I 'strace' the zsh process while it's stuck (after the pipe was deleted), it will terminate. I'm not sure what the explanation behind it is ...



Bart Schaefer wrote:

On Jun 1,  7:18am, Tim K. (Gmane) wrote:
} I have a situtation with zsh: I use pine as my mail reader and it has a } feature where it can create a named pipe (FIFO) and write to it when new } mail arrives. } } This all seems to work, except when I quit pine, hence terminating the } main "parent" script, the child "notify" script does not exit, it's } stuck reading from the pipe (even though the pipe is deleted).

I think this qualifies as a pine bug.  Removing a named pipe will not
by itself send an EOF to any processes that are listening on it.  The
right way for pine to shut down the connection would be to open the fifo,
remove the disk file, then send a final EOF by closing the descriptor.

Anything else is a race condition with the listening process, which may
re-open the fifo for reading before pine has removed it.

Messages sorted by: Reverse Date, Date, Thread, Author