Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Dec 1997 09:01:56 +1100 (EDT)
From:      Darren Reed <avalon@coombs.anu.edu.au>
To:        luigi@labinfo.iet.unipi.it (Luigi Rizzo)
Cc:        tlambert@primenet.com, julian@whistle.com, hackers@FreeBSD.ORG
Subject:   Re: Why FIONREAD has no dual for write ?
Message-ID:  <199712082202.OAA18121@hub.freebsd.org>
In-Reply-To: <199712081945.UAA29200@labinfo.iet.unipi.it> from "Luigi Rizzo" at Dec 8, 97 08:45:09 pm

next in thread | previous in thread | raw e-mail | index | archive | help
In some mail from Luigi Rizzo, sie said:
[...]
> > 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.
> 
> I agree with the above, except that it does not work in all situations.
> E.g. I am not sure but does select() guarantee that you don't
> end up writing/reading one byte at a time ? I know in practice things
> are different, but there is no standard behaviour I think, so the risk
> is still there. In the audio driver I had to modify the behaviour of
> select() (block size) using a separate ioctl().

I don't know how select() works with drivers such as the audio drivers,
but I've only encountered one OS which returned an fd as witeable when
it wasn't and it hasn't been possible to buy that particular Unix for
some years now.

> Plus there are apps which want only to check the status of the queue in
> a descriptor without actually doing the I/O, for whatever reason they
> like.

You can still use select for this.

Darren



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