diff options
author | Tom Tromey <tromey@redhat.com> | 2004-02-04 00:07:19 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2004-02-04 00:07:19 +0000 |
commit | 2565abce540cfd5657f357e8a853532f904b310a (patch) | |
tree | 7bef3202341339d36afb49d43768e474d3e55179 /libjava | |
parent | 40e02b4a76a59504e2708e7012dddd0eafb9d423 (diff) | |
download | gcc-2565abce540cfd5657f357e8a853532f904b310a.zip gcc-2565abce540cfd5657f357e8a853532f904b310a.tar.gz gcc-2565abce540cfd5657f357e8a853532f904b310a.tar.bz2 |
natPosixProcess.cc (startProcess): Handle case where PATH or LD_LIBRARY_PATH is not set in parent environment.
* java/lang/natPosixProcess.cc (startProcess): Handle case where
PATH or LD_LIBRARY_PATH is not set in parent environment.
From-SVN: r77203
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/java/lang/natPosixProcess.cc | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 69ea332..901aea4 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2004-02-03 Tom Tromey <tromey@redhat.com> + + * java/lang/natPosixProcess.cc (startProcess): Handle case where + PATH or LD_LIBRARY_PATH is not set in parent environment. + 2004-02-03 Thomas Fitzsimmons <fitzsim@redhat.com> * gnu/java/awt/peer/gtk/GtkListPeer.java, diff --git a/libjava/java/lang/natPosixProcess.cc b/libjava/java/lang/natPosixProcess.cc index ef46924..a6dfc1a 100644 --- a/libjava/java/lang/natPosixProcess.cc +++ b/libjava/java/lang/natPosixProcess.cc @@ -1,6 +1,6 @@ // natPosixProcess.cc - Native side of POSIX process code. -/* Copyright (C) 1998, 1999, 2000, 2002, 2003 Free Software Foundation +/* Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004 Free Software Foundation This file is part of libgcj. @@ -207,7 +207,7 @@ java::lang::ConcreteProcess::startProcess (jstringArray progarray, char *path_val = getenv ("PATH"); char *ld_path_val = getenv ("LD_LIBRARY_PATH"); environ = env; - if (getenv ("PATH") == NULL) + if (path_val && getenv ("PATH") == NULL) { char *path_env = (char *) _Jv_Malloc (strlen (path_val) + 5 + 1); @@ -215,7 +215,7 @@ java::lang::ConcreteProcess::startProcess (jstringArray progarray, strcat (path_env, path_val); putenv (path_env); } - if (getenv ("LD_LIBRARY_PATH") == NULL) + if (ld_path_val && getenv ("LD_LIBRARY_PATH") == NULL) { char *ld_path_env = (char *) _Jv_Malloc (strlen (ld_path_val) + 16 + 1); |