java.io/203: File.createTempFile doesn't close descriptor
Bryce McKinlay
bryce@albatross.co.nz
Sat Apr 15 20:00:00 GMT 2000
The following reply was made to PR java.io/203; it has been noted by GNATS.
From: Bryce McKinlay <bryce@albatross.co.nz>
To: jsturm@sigma6.com, java-gnats@sourceware.cygnus.com
Cc:
Subject: Re: java.io/203: File.createTempFile doesn't close descriptor
Date: Sun, 16 Apr 2000 14:54:59 +1200
jsturm@sigma6.com wrote:
> The code in File.createTempFile creates a descriptor that is
> never closed until the process exits. That doesn't seem right
> to me. One consequence is that a program that creates many
> temp files will eventually fail if it runs out of available
> file descriptors.
>
> Also, the directory argument to createTempFile is ignored,
> so temp files are always created in the current directory.
createTempFile() is broken in various other ways as wall, especially given that
we dont have the deleteOnExit() method. It should also be creating files in
/tmp rather than the cwd.
I intend to look into this sometime soonish, possibly in conjunction with
merging in some 1.2 java/io stuff from classpath.
regards
[ bryce ]
More information about the Java-prs
mailing list