-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
1.2.0, 1.2.1
-
x86, sparc
-
solaris_2.6
Name: tb29552 Date: 11/18/98
/*
This is a bug that was evidently introduced in
JDK 1.2 RC1.
I have an application that repeatedly invokes a program
by creating a Process object with the Runtime.exec
method. The process is destroyed when completed.
However, since the introduction of JDK 1.2 RC1, this
only works a few times before a bogus IOException
occurs. Evidently, system file handles are not getting
freed up when a Process object is destroyed.
Here is a test case the demonstrates the problem.
(By the way, I'm on a Solaris 5.5.1/x86 platform).
*/
import java.io.IOException;
class FHT {
public static void main(String args[]) {
for (int i = 0; i < 4000; i++) {
try {
Process p = Runtime.getRuntime().exec("/bin/echo hello");
p.destroy();
}
catch(IOException x) {
System.err.println("Bogus IOException after " + i +
" invocations: " + x.getMessage());
return;
}
}
}
}
(Review ID: 42890)
======================================================================
- relates to
-
JDK-4523660 (process) Process.destroy fails to close in/out/err streams causing IOException
-
- Closed
-