Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Dec 1997 08:01:15 -0500 (EST)
From:      "David E. Cross" <dec@phoenix.its.rpi.edu>
To:        Julian Elischer <julian@whistle.com>
Cc:        Luigi Rizzo <luigi@labinfo.iet.unipi.it>, hackers@FreeBSD.ORG
Subject:   Re: Why FIONREAD has no dual for write ?
Message-ID:  <Pine.BSF.3.96.971208075957.4595A-100000@phoenix.its.rpi.edu>
In-Reply-To: <Pine.BSF.3.95.971207230045.20612F-100000@current1.whistle.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 7 Dec 1997, Julian Elischer wrote:

> On Sat, 6 Dec 1997, Luigi Rizzo wrote:
> 
> > I think I already brought this out but recent discussion on mpegtv
> > suggests to bring this out again.
> > 
> > FIONREAD tells you how many bytes you can read before blocking.
> > 
> > There is no FIONWRITE call (how many bytes you can write before
> > blocking) which would be nice to have, instead of having to resort to
> > non-blocking writes.
> 
> but it could change between the time you do that call and the time that
> doo the write (you could be sharing a file descriptor, or you could be
> sharing a device) so you may have to handle the blocking write anyhow.
This is true even for FIONREAD, you could be sharing a file descriptor,
and another process could read that data before you do.

--
David Cross
ACS Consultant




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.971208075957.4595A-100000>