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:
Jesse Rosenstock 2002-08-14 01:07:59 +00:00 committed by Tom Tromey
parent cf87d551b0
commit eb812b2c15
7 changed files with 60 additions and 17 deletions

View file

@ -526,7 +526,6 @@ public class Runtime
* entries
* @throws IndexOutOfBoundsException if cmd is length 0
* @since 1.3
* @XXX Ignores dir, for now
*/
public Process exec(String[] cmd, String[] env, File dir)
throws IOException
@ -534,10 +533,7 @@ public class Runtime
SecurityManager sm = securityManager; // Be thread-safe!
if (sm != null)
sm.checkExec(cmd[0]);
if (env == null)
env = new String[0];
//XXX Should be: return execInternal(cmd, env, dir);
return execInternal(cmd, env);
return execInternal(cmd, env, dir);
}
/**
@ -729,7 +725,6 @@ public class Runtime
* the environment should contain name=value mappings. If directory is null,
* use the current working directory; otherwise start the process in that
* directory.
* XXX Add directory support.
*
* @param cmd the non-null command tokens
* @param env the non-null environment setup
@ -737,8 +732,7 @@ public class Runtime
* @return the newly created process
* @throws NullPointerException if cmd or env have null elements
*/
// native Process execInternal(String[] cmd, String[] env, File dir);
native Process execInternal(String[] cmd, String[] env);
native Process execInternal(String[] cmd, String[] env, File dir);
/**
* Get the system properties. This is done here, instead of in System,