re GNATS java.io/203 (File.createTempFile doesn't close descriptor)
Fix for PR java.io/203: * java/io/File.java (createTempFile): Obey directory argument. Use java.io.tmpdir if needed. Don't leave FileDescripators open. * java/lang/natSystem.cc (init_properties): Use TMPDIR environment variable to set java.io.tmpdir on non-WIN32 systems. From-SVN: r36143
This commit is contained in:
parent
40255aaf54
commit
a1fa0b27e7
3 changed files with 53 additions and 16 deletions
|
@ -244,8 +244,10 @@ java::lang::System::init_properties (void)
|
|||
SET ("file.separator", "/");
|
||||
SET ("path.separator", ":");
|
||||
SET ("line.separator", "\n");
|
||||
// FIXME: look at getenv("TMPDIR");
|
||||
SET ("java.io.tmpdir", "/tmp");
|
||||
char *tmpdir = ::getenv("TMPDIR");
|
||||
if (! tmpdir)
|
||||
tmpdir = "/tmp";
|
||||
SET ("java.io.tmpdir", tmpdir);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNAME
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue