process.waitFor()
Erik Poupaert
erik.poupaert@skynet.be
Thu Oct 9 06:22:00 GMT 2003
The following sequence works fine on linux, but not on windows (3.3, 3.4 alike).
It hangs at the point where it waits for the process forked (process.waitFor()) to
complete.
I've used Runtime.exec() on windows, however, without feeding anything to stdin --
just reading stdout. Then it works.
Is this a known problem?
Process process=Runtime.getRuntime().exec(execArgs);
threadIn.start();
threadOut.start();
threadErr.start();
exitCode=process.waitFor();
threadIn.join(0);
threadOut.join(0);
threadErr.join(0);
More information about the Java
mailing list