diff options
author | Andrew Haley <aph@cygnus.com> | 2000-06-28 12:24:10 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2000-06-28 12:24:10 +0000 |
commit | 52fa9d82f468914878c02a2a641f2b1bb55f579d (patch) | |
tree | 5b29ccb63d57e84b533d5502d97e0f3d92ecf224 /libjava/java/io/File.java | |
parent | 580ac503925ca3b85efd84cc3cf666ad7f659ef7 (diff) | |
download | gcc-52fa9d82f468914878c02a2a641f2b1bb55f579d.zip gcc-52fa9d82f468914878c02a2a641f2b1bb55f579d.tar.gz gcc-52fa9d82f468914878c02a2a641f2b1bb55f579d.tar.bz2 |
re GNATS java.io/203 (File.createTempFile doesn't close descriptor)
2000-06-27 Andrew Haley <aph@cygnus.com>
* java/io/File.java (createTempFile): Close the FileDescriptor
used to create a temp file. Fixes some of PR 203.
* java/io/natFileDescriptorPosix.cc (open): Call garbage
collection if we run out of file handles.
From-SVN: r34755
Diffstat (limited to 'libjava/java/io/File.java')
-rw-r--r-- | libjava/java/io/File.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libjava/java/io/File.java b/libjava/java/io/File.java index 38bcb9f..c8aaddf 100644 --- a/libjava/java/io/File.java +++ b/libjava/java/io/File.java @@ -260,7 +260,9 @@ public class File implements Serializable String l = prefix + t.substring(t.length() - 6) + suffix; try { - desc.open (l, FileDescriptor.WRITE | FileDescriptor.EXCL); + desc = new FileDescriptor + (l, FileDescriptor.WRITE | FileDescriptor.EXCL); + desc.close (); ret.setPath(l); return ret; } |