From owner-freebsd-java Tue Sep 10 5:56:59 2002 Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5C20637B400 for ; Tue, 10 Sep 2002 05:56:56 -0700 (PDT) Received: from csp.ru (ns.comch.ru [213.24.93.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5215643E3B for ; Tue, 10 Sep 2002 05:56:54 -0700 (PDT) (envelope-from alec@compunet.comch.ru) Received: from [213.24.92.44] (HELO compunet.comch.ru) by csp.ru (CommuniGate Pro SMTP 3.5.6) with ESMTP id 1888532 for java@freebsd.org; Tue, 10 Sep 2002 16:56:51 +0400 Received: from [192.168.55.23] (HELO alec.server.compunet.ru) by compunet.comch.ru (CommuniGate Pro SMTP 3.5.3) with ESMTP id 911319 for java@freebsd.org; Tue, 10 Sep 2002 16:26:25 +0400 Date: Tue, 10 Sep 2002 16:22:36 +0400 From: Alec Kalinin X-Mailer: The Bat! (v1.51) Personal Reply-To: Alec Kalinin Organization: Compunet X-Priority: 3 (Normal) Message-ID: <11924974070.20020910162236@compunet.comch.ru> To: java@freebsd.org Subject: Probably Process.waitFor() bug in jdk1.3.1p7 MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Доброго утра/вечера/ночи java! I tried following code in jdk1.2.2 and jdk1.3.1p7 on FreeBSD 4.3-RELEASE: ============ public class ProcessTest { private final String[] CMD_ARRAY = new String[] { "tar", "--to-stdout", "-xpzf", "/usr/ports/distfiles/gmake-3.78.1.tgz" }; private final int COUNT = 1; public static void main(String[] args) { ProcessTest pt = new ProcessTest(); pt.run(); } public void run() { try { for (int i = 0; i < COUNT; i++) { Process p = Runtime.getRuntime().exec(CMD_ARRAY); p.waitFor(); } } catch (Exception excp) { excp.printStackTrace(); } } } ============ The jdk1.2.2 successfully executed this program, but in jdk1.3.1p7 this program not finished. I got an endless loop, probably at p.waitFor() instruction. -- Удачи, Alec mailto:alec@compunet.comch.ru To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message