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