home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.11 / text0069.txt < prev    next >
Encoding:
Internet Message Format  |  1987-07-18  |  1.1 KB

  1. From: henry@utzoo.UUCP (Henry Spencer)
  2.  
  3. > Agreed that finding out how many files you have to close in order to be
  4. > sure you've closed them all is a pain on most implementations of UN*X.
  5. > IEEE 1003.1 is attempting to address this...
  6.  
  7. Actually, one way to solve this *particular* problem without the nastiness
  8. of the general case would be to have close() yield EBADF (as it does now)
  9. for a legal-but-not-open descriptor number and EDOM for a descriptor number
  10. beyond the implementation's limit.  (1003 doesn't currently include EDOM in
  11. its error-number list, since in existing implementations it's not returned
  12. by the kernel, but adding it shouldn't hurt anything.)
  13.  
  14. Another alternative would be to vary the code based on whether there is a
  15. higher-numbered descriptor still open or not.  It's no problem for the kernel
  16. to keep track of the highest open descriptor, so that the decision can be
  17. made quickly even on a system that allows lots of descriptors.
  18.  
  19.                 Henry Spencer @ U of Toronto Zoology
  20.                 {allegra,ihnp4,decvax,pyramid}!utzoo!henry
  21.  
  22. Volume-Number: Volume 11, Number 70
  23.  
  24.