Open FIFO non-blocking but have write() block(?)
craig at tobuj.gank.org
Sun Jun 3 04:32:18 UTC 2007
On Sat, Jun 02, 2007 at 11:57:19PM +0100, mal content wrote:
> Logging date appears on one, to be read by any external program and
> commands are read by the program from the other.
I can't speak to the blocking semantics, but if you plan to have more
than one process reading at once, FIFOs won't do what you want. I
suspect unix sockets are closer to the behavior you're after. IIRC
using them in datagram mode may give you the ability to write whether or
not anyone is listening. Otherwise you'll have to do the normal
listen, accept, select/poll loop.
More information about the freebsd-hackers