public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/14709] New: gcj fails to wait for its child processes on exec()
@ 2004-03-24 6:33 debian-gcc at lists dot debian dot org
2004-03-24 6:39 ` [Bug java/14709] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2004-03-24 6:33 UTC (permalink / raw)
To: java-prs
[forwarded from http://bugs.debian.org/238432]
When calling Runtime.getRuntime.exec(String) in program that has been
compiled with gcj-3.3.3, process is created and works as expected, but
process is not reaped. With Sun JVM 1.5.0-beta the same programs work
fine.
We tested this also with gcc-3.4 CVS 20040314-1, with same results.
Steps to reproduce:
1) Write a program that calls Runtime.getRuntime.exec("uptime"),
opens and closes both input and output stream and calls destroy()
to process (or use the one I attach when this report hits the web)
and that continues to run.
2) See process listing: the processes created by exec() show there
as <defunct>.
import java.io.*;
/**
* This program demonstrates bug in gcj Runtime.exec().
*
* @author Jari Juslin, zds@iki.fi
*
* @version $Revision$
*/
public class GcjExecBugDemo {
/* **************************************************************** */
void run() {
Process uptimeProcess;
Reader stdoutReader;
while (true) {
try {
uptimeProcess = Runtime.getRuntime().exec("uptime");
// Just to make sure that bug is not in not opening
// input to process.
uptimeProcess.getOutputStream().close();
stdoutReader = new
InputStreamReader(uptimeProcess.getInputStream());
while (stdoutReader.read() != -1)
;
stdoutReader.close();
uptimeProcess.destroy();
try {
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
} catch (IOException e) {
System.out.println("IOException: " +
e.getMessage());
try {
Thread.sleep(2000);
} catch (InterruptedException ex) {
ex.printStackTrace();
}
}
}
}
/* **************************************************************** */
public static void main(String[] args) {
GcjExecBugDemo gcjExecBugDemo;
gcjExecBugDemo = new GcjExecBugDemo();
gcjExecBugDemo.run();
}
}
--
Summary: gcj fails to wait for its child processes on exec()
Product: gcc
Version: 3.3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: debian-gcc at lists dot debian dot org
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14709
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug java/14709] gcj fails to wait for its child processes on exec()
2004-03-24 6:33 [Bug java/14709] New: gcj fails to wait for its child processes on exec() debian-gcc at lists dot debian dot org
@ 2004-03-24 6:39 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-24 6:39 UTC (permalink / raw)
To: java-prs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-24 06:39 -------
This is a dup of bug 11801.
*** This bug has been marked as a duplicate of 11801 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14709
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-03-24 6:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-24 6:33 [Bug java/14709] New: gcj fails to wait for its child processes on exec() debian-gcc at lists dot debian dot org
2004-03-24 6:39 ` [Bug java/14709] " pinskia at gcc dot gnu dot org
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).