[Bug libgcj/30937] Win32: Process.exitValue() does not work after multiple calls to a terminated process

2016-09-30 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30937

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #2 from Andrew Pinski  ---
Closing as won't fix as libgcj (and the java front-end) has been removed from
the trunk.

[Bug libgcj/30937] Win32: Process.exitValue() does not work after multiple calls to a terminated process

2007-02-23 Thread r_ovidius at eml dot cc


--- Comment #1 from r_ovidius at eml dot cc  2007-02-23 20:53 ---
Also seems to affect process.destroy() somehow.  The "DONE" is not printed
after the destroy call on gcj win32, but is on Sun.




public class ProcTest {

  static Process process;

  public static void main(String[] args) {
try {
  String bat = "exitcode.bat";
  PrintStream p = new PrintStream(new FileOutputStream(bat));
  p.println("@exit 5");
  p.close();

  process = Runtime.getRuntime().exec(bat);

  try {
int wf = process.waitFor();
System.err.println(wf);
  } catch (InterruptedException e) {
  }

  try {
int ev = process.exitValue();
System.err.println("EV: " + ev + " " + process);
  } catch (IllegalThreadStateException ile) {
System.err.println("X: " + ile);
  }

  try {
int ev = process.exitValue();
System.err.println("EV: " + ev + " " + process);
  } catch (IllegalThreadStateException ile) {
System.err.println("X: " + ile);
  }

  process.destroy();

  System.err.println("DONE");

} catch (Exception e) {
  e.printStackTrace();
}

  }

}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30937