Fix for PR libgcj/7570 and PR libgcj/7578:
2002-08-13 Jesse Rosenstock <jmr@ugcs.caltech.edu> Fix for PR libgcj/7570 and PR libgcj/7578: * java/lang/natPosixProcess.cc: Include java/io/File.h. (startProcess): Handle new `dir' argument. * java/lang/Win32Process.java (ConcreteProcess): Added `dir' argument. * java/lang/PosixProcess.java (ConcreteProcess): Added `dir' argument. (startProcess): Likewise. * java/lang/EcosProcess.java (ConcreteProcess): Added `dir' argument. * java/lang/Runtime.java (execInternal): Added `dir' argument. (exec): Don't create new environment if ENV==null. Pass DIR to execInternal. * java/lang/natRuntime.cc: Include java/io/File.h. (execInternal): Added `dir' argument. From-SVN: r56268
This commit is contained in:
parent
cf87d551b0
commit
eb812b2c15
7 changed files with 60 additions and 17 deletions
|
@ -10,6 +10,7 @@ details. */
|
|||
|
||||
package java.lang;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -53,15 +54,20 @@ final class ConcreteProcess extends Process
|
|||
|
||||
// This is used for actual initialization, as we can't write a
|
||||
// native constructor.
|
||||
public native void startProcess (String[] progarray, String[] envp)
|
||||
public native void startProcess (String[] progarray,
|
||||
String[] envp,
|
||||
File dir)
|
||||
throws IOException;
|
||||
|
||||
// This file is copied to `ConcreteProcess.java' before
|
||||
// compilation. Hence the constructor name apparently does not
|
||||
// match the file name.
|
||||
public ConcreteProcess (String[] progarray, String[] envp) throws IOException
|
||||
public ConcreteProcess (String[] progarray,
|
||||
String[] envp,
|
||||
File dir)
|
||||
throws IOException
|
||||
{
|
||||
startProcess (progarray, envp);
|
||||
startProcess (progarray, envp, dir);
|
||||
}
|
||||
|
||||
// The process id. This is cast to a pid_t on the native side.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue