Article View: comp.std.unix
Article #247asyncronous I/O notification in POSIX: a question
From: Phil Howard
Date: Thu, 27 Aug 1992 23:55
Date: Thu, 27 Aug 1992 23:55
35 lines
2120 bytes
2120 bytes
Submitted-by: pdh@netcom.com (Phil Howard ) I read in "POSIX PROGRAMMER'S GUIDE - Writing Portable UNIX Programs", by Donald Lewine (O'Reilly & Associates, publisher)... ...that POSIX has a macro flag called O_NONBLOCK, which can be used in open() and in fcntl() to effect asyncronous I/O. I also read that the read() and write() functions will return an error with the EAGAIN value in "errno" ifn the attempted I/O would block the process to complete that function call. What I cannot find or cannot figure out is how the process that has received the EAGAIN code from one of these functions is going to be able to be notified of the fact that I/O is now completeable when that condition exists, and how it can find out which file descriptor(s) has the I/O ready (of probably 2 or more in cases where the benefit of the asyncronous I/O is helpful). The mechanism I use in BSD is the select() function. I don't have access to a POSIX conformant system at the present time, but I would like to design new programs I write so that are "POSIX ready" as much as I can do it, so that the effort to port them to POSIX is trivial (hopefully). Can anyone fill me in on how this is done? If you think it is best to send me e-mail directly, send it to: pdh@netcom.com. Thanks. -- /***********************************************************************\ | Phil Howard --- KA9WGN --- pdh@netcom.com | "The problem with | | depending on government is that you cannot depend on it" - Tony Brown | \***********************************************************************/ Volume-Number: Volume 29, Number 14
Technical Details
Message-ID:
<17jq1lINN7gc@ftp.UU.NET>Path:
arc1-ca.pugleaf.net!sparky!uunet!uunet!not-for-mailShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!uunet!not-for-mail From: pdh@netcom.com (Phil Howard ) Newsgroups: comp.std.unix Subject: asyncronous I/O notification in POSIX: a question Date: 27 Aug 1992 16:55:33 -0700 Organization: Netcom - Online Communication Services (408 241-9760 guest) Lines: 35 Sender: sef@ftp.UU.NET Approved: sef@ftp.uucp (Moderator, Sean Eric Fagan) Message-ID: <17jq1lINN7gc@ftp.UU.NET> NNTP-Posting-Host: ftp.uu.net X-Submissions: std-unix@uunet.uu.net