PATCH: remove all traces of java.io.FileDescriptor from java.net
Tom Tromey
tromey@redhat.com
Mon Mar 25 15:10:00 GMT 2002
>>>>> "Bryce" == Bryce McKinlay <bryce@waitaki.otago.ac.nz> writes:
Bryce> I agree that it is incorrect. But how likely is this to occur?
Bryce> Does linux actually re-use closed file descriptor numbers like
Bryce> this? My recollection is that it doesn't (at least for a long
Bryce> time). But maybe I'm wrong.
Historically Unix always allocated the smallest available fd.
If you dig in some old sources you can find a replacement
implementation of dup2() that uses only close() and dup().
I wouldn't be surprised if Linux does this as well, for compatibility
if nothing else.
Tom
More information about the Java-patches
mailing list