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
This commit is contained in:
parent
580ac50392
commit
52fa9d82f4
3 changed files with 18 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue