home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.28 / text0055.txt < prev    next >
Encoding:
Text File  |  1992-08-17  |  1.6 KB  |  36 lines

  1. Submitted-by: johnl@iecc.cambridge.ma.us (John R. Levine)
  2.  
  3. >Of course, the irony of this is that SVR4 supports select as well as
  4. >poll, so it is tempting to consider select the more portable of the
  5. >two despite its problems.
  6.  
  7. Perhaps, but the SVR4 implementation of select is just a wrapper around a
  8. call to poll.  I'd be inclined to favor poll as being better defined with
  9. a note that you can still wrap select around it for the benefit of
  10. oldthinkers.
  11.  
  12. One annoyance with the SysV implementation of poll and select is that it
  13. doesn't work on every possible file descriptor, and it's hard to predict
  14. on exactly which files it will work.  It always works on streams files
  15. which include terminals, pipes, and network connections.  It'll work on
  16. other character special files if the driver provides a poll handling
  17. routine.  I've never seen a non-streams driver in SVR4 which had one, but
  18. the non-streams character drivers in SVR4 are things like /dev/kmem that
  19. are not prime candidates for polling.  Poll never works on block devices.
  20. People seem to find the SVR4 implementation of select adequate, so it
  21. appears that the things that poll doesn't do aren't things that anyone
  22. expected select to do, either.
  23.  
  24. But it's not clear to me that a definition of select or poll that had to
  25. involve hand waving about what files you can poll would be worth putting
  26. into Posix.  Maybe we could limit it to terminals, network connections,
  27. and pipes, but then you get into questions like whether an NFS mounted
  28. file system is considered a network connection, and why not.
  29.  
  30. Regards,
  31. John Levine, johnl@iecc.cambridge.ma.us, {spdcc|ima|world}!iecc!johnl
  32.  
  33.  
  34. Volume-Number: Volume 28, Number 57
  35.  
  36.