public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* libgcj/1179: File.createTempFile doesn't close descriptor
@ 2000-12-20 12:21 jsturm
  0 siblings, 0 replies; only message in thread
From: jsturm @ 2000-12-20 12:21 UTC (permalink / raw)
  To: java-gnats

>Number:         1179
>Category:       libgcj
>Synopsis:       File.createTempFile doesn't close descriptor
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    green
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 20 12:17:04 PST 2000
>Closed-Date:    Sun Oct 15 11:41:45 PDT 2000
>Last-Modified:  Sun Oct 15 11:50:00 PDT 2000
>Originator:     Jeff Sturm
>Release:        CVS libgcj
>Organization:
>Environment:
Any
>Description:
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.
>How-To-Repeat:
Run the attached program (warning, it will create many files).
>Fix:

>Release-Note:

>Audit-Trail:

Formerly PR java.io/203


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 ]
 
 
Responsible-Changed-From-To: tromey->green
Responsible-Changed-By: green
Responsible-Changed-When: Mon Sep  4 13:17:33 2000
Responsible-Changed-Why:
    I've submitted a patch for these problems.
State-Changed-From-To: open->feedback
State-Changed-By: green
State-Changed-When: Mon Sep  4 13:17:33 2000
State-Changed-Why:
    I just submitted a patch for these problems.
    
    See: 
    
    http://sources.redhat.com/ml/java-patches/2000-q3/msg00169.html

From: green@cygnus.com
To: green@cygnus.com, java-gnats@sourceware.cygnus.com, jsturm@sigma6.com,
  tromey@cygnus.com
Cc:  
Subject: Re: java.io/203
Date: 4 Sep 2000 20:17:33 -0000

 Synopsis: File.createTempFile doesn't close descriptor
 
 Responsible-Changed-From-To: tromey->green
 Responsible-Changed-By: green
 Responsible-Changed-When: Mon Sep  4 13:17:33 2000
 Responsible-Changed-Why:
     I've submitted a patch for these problems.
 State-Changed-From-To: open->feedback
 State-Changed-By: green
 State-Changed-When: Mon Sep  4 13:17:33 2000
 State-Changed-Why:
     I just submitted a patch for these problems.
     
     See: 
     
     http://sources.redhat.com/ml/java-patches/2000-q3/msg00169.html
 
 http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=203&database=java

From: green@sourceware.cygnus.com
To: java-gnats@sources.redhat.com
Cc:  
Subject: java.io/203
Date: 4 Sep 2000 20:57:18 -0000

 CVSROOT:	/cvs/java
 Module name:	libgcj
 Changes by:	green@sourceware.cygnus.com	2000-09-04 13:57:18
 
 Modified files:
 	libjava        : ChangeLog 
 	libjava/java/io: File.java 
 	libjava/java/lang: natSystem.cc 
 
 Log message:
 	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.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/gcc/libjava/ChangeLog.diff?cvsroot=java&r1=1.476&r2=1.477
 http://gcc.gnu.org/cgi-bin/gcc/libjava/java/io/File.java.diff?cvsroot=java&r1=1.12&r2=1.13
 http://gcc.gnu.org/cgi-bin/gcc/libjava/java/lang/natSystem.cc.diff?cvsroot=java&r1=1.24&r2=1.25
 
State-Changed-From-To: feedback->closed
State-Changed-By: green
State-Changed-When: Sun Oct 15 11:41:45 2000
State-Changed-Why:
    I think this has been fixed for some time.  Let me know if you
    think otherwise.

From: green@cygnus.com
To: green@cygnus.com, java-gnats@sourceware.cygnus.com, jsturm@sigma6.com
Cc:  
Subject: Re: java.io/203
Date: 15 Oct 2000 18:41:45 -0000

 Synopsis: File.createTempFile doesn't close descriptor
 
 State-Changed-From-To: feedback->closed
 State-Changed-By: green
 State-Changed-When: Sun Oct 15 11:41:45 2000
 State-Changed-Why:
     I think this has been fixed for some time.  Let me know if you
     think otherwise.
 
 http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=203&database=java
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="T.java"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="T.java"

aW1wb3J0IGphdmEuaW8uRmlsZTsKCnB1YmxpYyBjbGFzcyBUIHsKCXB1YmxpYyBzdGF0aWMgdm9p
ZCBtYWluKFN0cmluZ1tdIGFyZ3MpIHsKCQl0cnkgewoJCQlGaWxlIHRlbXBEaXJlY3RvcnkgPSBu
ZXcgRmlsZSgiL3RtcC8iKTsKCgkJCXdoaWxlICh0cnVlKSB7CgkJCQlTeXN0ZW0ub3V0LnByaW50
bG4oRmlsZS5jcmVhdGVUZW1wRmlsZSgKCQkJCQkidGVzdCIsIG51bGwsIHRlbXBEaXJlY3Rvcnkp
KTsKCQkJCVRocmVhZC5zbGVlcCgxMDApOwoJCQl9CgkJfSBjYXRjaCAoVGhyb3dhYmxlIHQpIHsK
CQkJU3lzdGVtLmVyci5wcmludGxuKHQuZ2V0TWVzc2FnZSgpKTsKCQl9Cgl9Cn0K


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-12-20 12:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-20 12:21 libgcj/1179: File.createTempFile doesn't close descriptor jsturm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).