From owner-freebsd-java Fri Jan 30 19:09:00 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA29747 for java-outgoing; Fri, 30 Jan 1998 19:09:00 -0800 (PST) (envelope-from owner-freebsd-java@FreeBSD.ORG) Received: from bangkok.office.cdsnet.net (bangkok.office.cdsnet.net [204.118.245.49]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA29722 for ; Fri, 30 Jan 1998 19:08:57 -0800 (PST) (envelope-from cts@bangkok.office.cdsnet.net) Received: (from cts@localhost) by bangkok.office.cdsnet.net (8.8.8/8.8.5) id TAA24210; Fri, 30 Jan 1998 19:08:55 -0800 (PST) Date: Fri, 30 Jan 1998 19:08:55 -0800 (PST) Message-Id: <199801310308.TAA24210@bangkok.office.cdsnet.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Craig Spannring To: freebsd-java@FreeBSD.ORG Subject: Bug in java.lang.Process.waitFor()? X-Mailer: VM 6.31 under Emacs 19.34.1 Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe java" 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. =======================================================================