Skip site navigation (1)Skip section navigation (2)
Date:      27 Oct 2001 11:35:52 +0100
From:      Simon Marlow <simonm@smarlow.com>
To:        Bill Fenner <fenner@research.att.com>
Cc:        bde@zeta.org.au, rwatson@FreeBSD.ORG, bright@mu.org, arch@FreeBSD.ORG
Subject:   Re: Behavior of select() on pipes
Message-ID:  <m0zo6dz7xz.fsf@rachel.home>
In-Reply-To: Bill Fenner's message of "Fri, 26 Oct 2001 14:23:17 -0700"
References:  <200110262123.OAA13087@windsor.research.att.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Bill Fenner <fenner@research.att.com> writes:

> But the standard behavior makes O_NONBLOCK FIFOs relatively useless;
> once you open it for read you have no way to find out when a writer
> arrives without blocking.  You have to become a writer yourself, which
> may limit the usefulness of permissions on the FIFO (e.g. an rw-r-----
> FIFO for messages from fenner to group foo; anyone in group foo could
> become the reader but it's impossible for them to open for writing to
> get around this behavior).


I'd just like to second that.  I've had particular problesm with FIFOs
on FreeBSD in the threaded runtime system for our Haskell compiler
(lang/ghc).  The runtime system opens everything O_NONBLOCK, and
manages blocking and thread scheduling internally, pretty much like
libc_r I imagine.

We have to tell people to open FIFOs in read/write mode on FreeBSD to
work around this behaviour.  (incidentally, doesn't libc_r have this
problem?)

FreeBSD might be correct w.r.t. the POSIX spec, but I think this is
one of those cases where you've just got to admit that the behaviour
mandated by the spec isn't useful.

Cheers,
	Simon

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




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