From owner-freebsd-hackers Mon Dec 8 05:01:35 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id FAA04265 for hackers-outgoing; Mon, 8 Dec 1997 05:01:35 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from phoenix.its.rpi.edu (dec@phoenix.its.rpi.edu [128.113.161.45]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id FAA04259 for ; Mon, 8 Dec 1997 05:01:31 -0800 (PST) (envelope-from dec@phoenix.its.rpi.edu) Received: from localhost (dec@localhost) by phoenix.its.rpi.edu (8.8.8/8.8.7) with SMTP id IAA04659; Mon, 8 Dec 1997 08:01:16 -0500 (EST) (envelope-from dec@phoenix.its.rpi.edu) Date: Mon, 8 Dec 1997 08:01:15 -0500 (EST) From: "David E. Cross" To: Julian Elischer cc: Luigi Rizzo , hackers@FreeBSD.ORG Subject: Re: Why FIONREAD has no dual for write ? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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