Checking if the other end of a fifo is open

Michael Torrie torriem at
Thu Apr 9 14:23:52 MDT 2009

Dave Smith wrote:
> I'm writing a bash script that communicates with a daemon process using 
> a fifo. I am trying to bulletproof the script to safeguard myself if the 
> daemon process crashes before it starts writing to the fifo. 

Hmm.  You might need to look into Perl or Python.  Use ioctl to use
non-blocking mode.  With threads also timeouts are pretty easy in these
languages.  With bash, I'm not sure you'll find a good solution.

More information about the PLUG mailing list