From: Jamie Lokier <lk@tantalophile.demon.co.uk>
To: Amos Waterland <apw@us.ibm.com>
Cc: William Lee Irwin III <wli@holomorphy.com>,
linux-kernel@vger.kernel.org, Tom Gall <tom_gall@vnet.ibm.com>
Subject: Re: O_ASYNC question
Date: Thu, 27 Jun 2002 13:15:11 +0100 [thread overview]
Message-ID: <20020627131511.A16012@kushida.apsleyroad.org> (raw)
In-Reply-To: <20020626163755.A10713@kvasir.austin.ibm.com>; from apw@us.ibm.com on Wed, Jun 26, 2002 at 04:37:55PM -0500
Amos Waterland wrote:
> When you say that it is 'not done for files', does that mean that it is
> not done by design, and no plans exist to implement it for files
> (perhaps because completion notification is fundamentally different than
> readiness notification?), or that the work just has yet to be done?
> Thanks.
It isn't implemented for files, per POSIX I believe - in the same way
that select() will always return readable and writable on files.
I believe (i.e. I assume in my code ;-) that you should treat a SIGIO as
something which occurs when an fd transitions from "not readable" to
"readable", or from "not writable" to "writable". This applies even to
sockets: if you read only part of the readable data from a socket, then
you won't receive a SIGIO just because there is more unread data.
If the fd is permanently "readable" and "writable", such as with a file,
then there is no transition. Following this logic, you don't actually
need a special case for different kinds of fd -- you just need to check
their status with poll(), select(), or by trying a read/write operation
and checking for EAGAIN.
Please, someone point out if this logic does not hold, thanks :-)
-- Jamie
next prev parent reply other threads:[~2002-06-27 12:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-25 16:30 Amos Waterland
2002-06-26 21:11 ` William Lee Irwin III
2002-06-26 21:37 ` Amos Waterland
2002-06-27 0:56 ` William Lee Irwin III
2002-06-27 12:15 ` Jamie Lokier [this message]
2006-11-10 22:57 Mikulas Patocka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020627131511.A16012@kushida.apsleyroad.org \
--to=lk@tantalophile.demon.co.uk \
--cc=apw@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tom_gall@vnet.ibm.com \
--cc=wli@holomorphy.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®