Date: Fri, 30 Jan 1998 19:08:55 -0800 (PST) From: Craig Spannring <cts@cdsnet.net> To: freebsd-java@FreeBSD.ORG Subject: Bug in java.lang.Process.waitFor()? Message-ID: <199801310308.TAA24210@bangkok.office.cdsnet.net>
next in thread | raw e-mail | index | archive | help
I can't seem to get the waitFor() to ever return. The problem appears in both jdk1.1.5 port and the jdk1.1.2 for FreeBSD. The waitFor() in the Windows jdk1.1.4 seems to work fine the way I'm using it. BTW- I'm running 2.2.5-STABLE. Example- import java.lang.Runtime; import java.lang.Process; public class WaitProblem { public static void main(String argv[]) throws java.io.IOException, java.lang.InterruptedException { String cmd[] = {"grep", "foo", "afile"}; Runtime rt = Runtime.getRuntime(); Process p; System.out.println("Executing the command"); p = rt.exec(cmd); System.out.println("Command should be running"); p.waitFor(); // never gets here System.out.println("Command should be done"); } } -- ======================================================================= Life is short. | Craig Spannring Ski hard, Bike fast. | cts@cdsnet.net --------------------------------+------------------------------------ Any sufficiently perverted technology is indistinguishable from Perl. =======================================================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801310308.TAA24210>