Checking if the other end of a fifo is open

Nicholas Leippe nick at leippe.com
Thu Apr 9 14:09:52 MDT 2009


What about:
1) create a trap handler
2) set a flag
3) background a subshell that sleeps then signals the parent (your timeout)
4) attempt the write, after which clear the flag
5) if the trap handler finds the flag still set, you're blocked and can exit, 
or do whatever.





More information about the PLUG mailing list