re PR libgcj/12231 ([win32] Console applications spawned via Runtime.exec( ) in a GUI application flash console window)

PR libgcj/12231
	* java/lang/Win32Process.java (hasExited) Changed from
	public to private.
	(startProcess): Likewise.
	(cleanup): Likewise.
	* java/lang/natWin32Process.cc (cleanup) Don't close
	input, output and error streams.
	(ChildProcessPipe): New helper class.
	(startProcess): Refactored to use ChildProcessPipe.
	Use CREATE_NO_WINDOW when launching child process.

From-SVN: r73326
This commit is contained in:
Mohan Embar 2003-11-07 03:16:49 +00:00 committed by Mohan Embar
parent bbf76ec06c
commit cafa50327c
3 changed files with 130 additions and 74 deletions

View file

@ -28,8 +28,6 @@ final class ConcreteProcess extends Process
{
public native void destroy ();
public native boolean hasExited ();
public int exitValue ()
{
if (! hasExited ())
@ -55,13 +53,6 @@ final class ConcreteProcess extends Process
public native int waitFor () throws InterruptedException;
public native void startProcess (String[] progarray,
String[] envp,
File dir)
throws IOException;
public native void cleanup ();
public ConcreteProcess (String[] progarray,
String[] envp,
File dir)
@ -89,4 +80,11 @@ final class ConcreteProcess extends Process
// Exit code of the child if it has exited.
private int exitCode;
private native boolean hasExited ();
private native void startProcess (String[] progarray,
String[] envp,
File dir)
throws IOException;
private native void cleanup ();
}