home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / std / unix / 402 < prev    next >
Encoding:
Internet Message Format  |  1992-08-27  |  2.0 KB

  1. Path: sparky!uunet!uunet!not-for-mail
  2. From: pdh@netcom.com (Phil Howard )
  3. Newsgroups: comp.std.unix
  4. Subject: asyncronous I/O notification in POSIX: a question
  5. Date: 27 Aug 1992 16:55:33 -0700
  6. Organization: Netcom - Online Communication Services  (408 241-9760 guest)
  7. Lines: 35
  8. Sender: sef@ftp.UU.NET
  9. Approved: sef@ftp.uucp (Moderator, Sean Eric Fagan)
  10. Message-ID: <17jq1lINN7gc@ftp.UU.NET>
  11. NNTP-Posting-Host: ftp.uu.net
  12. X-Submissions: std-unix@uunet.uu.net
  13.  
  14. Submitted-by: pdh@netcom.com (Phil Howard )
  15.  
  16. I read in "POSIX PROGRAMMER'S GUIDE - Writing Portable UNIX Programs", by
  17. Donald Lewine (O'Reilly & Associates, publisher)...
  18.  
  19. ...that POSIX has a macro flag called O_NONBLOCK, which can be used in
  20. open() and in fcntl() to effect asyncronous I/O.  I also read that the
  21. read() and write() functions will return an error with the EAGAIN value
  22. in "errno" ifn the attempted I/O would block the process to complete that
  23. function call.
  24.  
  25. What I cannot find or cannot figure out is how the process that has
  26. received the EAGAIN code from one of these functions is going to be
  27. able to be notified of the fact that I/O is now completeable when that
  28. condition exists, and how it can find out which file descriptor(s) has
  29. the I/O ready (of probably 2 or more in cases where the benefit of the
  30. asyncronous I/O is helpful).
  31.  
  32. The mechanism I use in BSD is the select() function.
  33.  
  34. I don't have access to a POSIX conformant system at the present time,
  35. but I would like to design new programs I write so that are "POSIX ready"
  36. as much as I can do it, so that the effort to port them to POSIX is
  37. trivial (hopefully).
  38.  
  39. Can anyone fill me in on how this is done?  If you think it is best to
  40. send me e-mail directly, send it to: pdh@netcom.com.  Thanks.
  41. -- 
  42. /***********************************************************************\
  43. | Phil Howard  ---  KA9WGN  ---  pdh@netcom.com   |   "The problem with |
  44. | depending on government is that you cannot depend on it" - Tony Brown |
  45. \***********************************************************************/
  46.  
  47.  
  48. Volume-Number: Volume 29, Number 14
  49.