summaryrefslogtreecommitdiffstats
path: root/libjava/java/lang
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-04 00:07:19 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-04 00:07:19 +0000
commitb1a3cc68ba47575ac6d025b1af0f273c713ea99e (patch)
tree7bef3202341339d36afb49d43768e474d3e55179 /libjava/java/lang
parenta2e238f7fd3ace8ef3029c5fa0ab7e0df0232127 (diff)
downloadppe42-gcc-b1a3cc68ba47575ac6d025b1af0f273c713ea99e.tar.gz
ppe42-gcc-b1a3cc68ba47575ac6d025b1af0f273c713ea99e.zip
* java/lang/natPosixProcess.cc (startProcess): Handle case where
PATH or LD_LIBRARY_PATH is not set in parent environment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77203 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/lang')
-rw-r--r--libjava/java/lang/natPosixProcess.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/libjava/java/lang/natPosixProcess.cc b/libjava/java/lang/natPosixProcess.cc
index ef469242fd6..a6dfc1ada28 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);
OpenPOWER on IntegriCloud