Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Oct 2001 14:23:17 -0700
From:      Bill Fenner <fenner@research.att.com>
To:        bde@zeta.org.au
Cc:        rwatson@freebsd.org, bright@mu.org, arch@freebsd.org
Subject:   Re: Behavior of select() on pipes
Message-ID:  <200110262123.OAA13087@windsor.research.att.com>

next in thread | raw e-mail | index | archive | help

Yes, it's a shame that the description of select() carefully covers
this case and it's completely missing from poll().

>> Perhaps we can carefully interpret "an empty .. FIFO" to exclude the
>> time before the first writer opens it.  Maybe during that time it's not
>> empty, it's untenanted.
>
>Ugh.  It makes sense for the state not to depend on previous activity.
>It reduces the effect of races.

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).

  Bill

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?200110262123.OAA13087>