Date: Mon, 8 Dec 1997 18:22:33 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: luigi@labinfo.iet.unipi.it (Luigi Rizzo) Cc: julian@whistle.com, hackers@freebsd.org Subject: Re: Why FIONREAD has no dual for write ? Message-ID: <199712081822.LAA23908@usr01.primenet.com> In-Reply-To: <199712080835.JAA28372@labinfo.iet.unipi.it> from "Luigi Rizzo" at Dec 8, 97 09:35:06 am
next in thread | previous in thread | raw e-mail | index | archive | help
> What do we gain from this ? > > We have a 20 years old interface (FIONREAD..) and I can understand that > at that time some needs (e.g. synchronizing streams) were simply not > there. Now we have new requirements and apps, and it would be appropriate > to work on a common interface which is as device independent as > possible. IMO, the canonically "correct" thing to do would be to read and write using a non-blocking descriptor. This eliminates the multiple reader/ write buffer consumption races. It's short, it's elegant, and you can still use "select()" for the readability/writeability to avoid turning the program into a polling loop. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712081822.LAA23908>