Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Jun 2007 23:32:13 -0500
From:      Craig Boston <craig@tobuj.gank.org>
To:        mal content <artifact.one@googlemail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Open FIFO non-blocking but have write() block(?)
Message-ID:  <20070603043203.GA1341@nowhere>
In-Reply-To: <8e96a0b90706021557h2168337emb9b7b59a2084530e@mail.gmail.com>
References:  <8e96a0b90706021557h2168337emb9b7b59a2084530e@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

Craig



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070603043203.GA1341>