// Win32Process.java - Subclass of Process for Win32 systems.
-/* Copyright (C) 2002, 2003, 2006 Free Software Foundation
+/* Copyright (C) 2002, 2003, 2006, 2007 Free Software Foundation
This file is part of libgcj.
public native int waitFor () throws InterruptedException;
- public Win32Process (String[] progarray,
- String[] envp,
- File dir)
+ public Win32Process (String[] progarray, String[] envp, File dir,
+ boolean redirect)
throws IOException
{
for (int i = 0; i < progarray.length; i++)
progarray[i] = "\"" + s + "\"";
}
- startProcess (progarray, envp, dir);
+ startProcess (progarray, envp, dir, redirect);
}
// The standard streams (stdin, stdout and stderr, respectively)
private native boolean hasExited ();
private native void startProcess (String[] progarray,
- String[] envp,
- File dir)
+ String[] envp,
+ File dir,
+ boolean redirect)
throws IOException;
private native void cleanup ();
+
+ private static class EOFInputStream extends InputStream
+ {
+ static EOFInputStream instance = new EOFInputStream();
+ public int read()
+ {
+ return -1;
+ }
+ }
}