home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.29 / text0014.txt < prev    next >
Encoding:
Text File  |  1992-12-26  |  1.6 KB  |  37 lines

  1. Submitted-by: pdh@netcom.com (Phil Howard )
  2.  
  3. I read in "POSIX PROGRAMMER'S GUIDE - Writing Portable UNIX Programs", by
  4. Donald Lewine (O'Reilly & Associates, publisher)...
  5.  
  6. ...that POSIX has a macro flag called O_NONBLOCK, which can be used in
  7. open() and in fcntl() to effect asyncronous I/O.  I also read that the
  8. read() and write() functions will return an error with the EAGAIN value
  9. in "errno" ifn the attempted I/O would block the process to complete that
  10. function call.
  11.  
  12. What I cannot find or cannot figure out is how the process that has
  13. received the EAGAIN code from one of these functions is going to be
  14. able to be notified of the fact that I/O is now completeable when that
  15. condition exists, and how it can find out which file descriptor(s) has
  16. the I/O ready (of probably 2 or more in cases where the benefit of the
  17. asyncronous I/O is helpful).
  18.  
  19. The mechanism I use in BSD is the select() function.
  20.  
  21. I don't have access to a POSIX conformant system at the present time,
  22. but I would like to design new programs I write so that are "POSIX ready"
  23. as much as I can do it, so that the effort to port them to POSIX is
  24. trivial (hopefully).
  25.  
  26. Can anyone fill me in on how this is done?  If you think it is best to
  27. send me e-mail directly, send it to: pdh@netcom.com.  Thanks.
  28. -- 
  29. /***********************************************************************\
  30. | Phil Howard  ---  KA9WGN  ---  pdh@netcom.com   |   "The problem with |
  31. | depending on government is that you cannot depend on it" - Tony Brown |
  32. \***********************************************************************/
  33.  
  34.  
  35. Volume-Number: Volume 29, Number 14
  36.  
  37.