diff options
author | Jesse Rosenstock <jmr@ugcs.caltech.edu> | 2002-08-14 01:07:59 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2002-08-14 01:07:59 +0000 |
commit | eb812b2c153b214cdfd54c4a9b9cf4a05d5aed5d (patch) | |
tree | 8859acca9986ffae17e81f17067a13db5493f641 /libjava/java/lang/Runtime.java | |
parent | cf87d551b09fe04a5878a6ea481114d039b93496 (diff) | |
download | gcc-eb812b2c153b214cdfd54c4a9b9cf4a05d5aed5d.zip gcc-eb812b2c153b214cdfd54c4a9b9cf4a05d5aed5d.tar.gz gcc-eb812b2c153b214cdfd54c4a9b9cf4a05d5aed5d.tar.bz2 |
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
Diffstat (limited to 'libjava/java/lang/Runtime.java')
-rw-r--r-- | libjava/java/lang/Runtime.java | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/libjava/java/lang/Runtime.java b/libjava/java/lang/Runtime.java index eb34391..932600b 100644 --- a/libjava/java/lang/Runtime.java +++ b/libjava/java/lang/Runtime.java @@ -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, |