Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Sep 2002 16:22:36 +0400
From:      Alec Kalinin <alec@compunet.comch.ru>
To:        java@freebsd.org
Subject:   Probably Process.waitFor() bug in jdk1.3.1p7
Message-ID:  <11924974070.20020910162236@compunet.comch.ru>

next in thread | raw e-mail | index | archive | help
Доброго утра/вечера/ночи 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?11924974070.20020910162236>