* java/lang/natPosixProcess.cc (startProcess): Don't use sprintf.
From-SVN: r30996
This commit is contained in:
parent
53f4a9f689
commit
ce63fdce90
2 changed files with 9 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
1999-12-17 Tom Tromey <tromey@cygnus.com>
|
||||||
|
|
||||||
|
* java/lang/natPosixProcess.cc (startProcess): Don't use sprintf.
|
||||||
|
|
||||||
1999-12-16 Bryce McKinlay <bryce@albatross.co.nz>
|
1999-12-16 Bryce McKinlay <bryce@albatross.co.nz>
|
||||||
|
|
||||||
* java/lang/Boolean.java (Boolean(String)): Set `value' to false on a
|
* java/lang/Boolean.java (Boolean(String)): Set `value' to false on a
|
||||||
|
|
|
@ -168,12 +168,13 @@ java::lang::ConcreteProcess::startProcess (jstringArray progarray,
|
||||||
if (envp)
|
if (envp)
|
||||||
{
|
{
|
||||||
// preserve PATH unless specified explicitly
|
// preserve PATH unless specified explicitly
|
||||||
char *path_val = getenv("PATH");
|
char *path_val = getenv ("PATH");
|
||||||
environ = env;
|
environ = env;
|
||||||
if (getenv("PATH") == NULL)
|
if (getenv ("PATH") == NULL)
|
||||||
{
|
{
|
||||||
char *path_env = (char *) _Jv_Malloc (strlen(path_val) + 5 + 1);
|
char *path_env = (char *) _Jv_Malloc (strlen (path_val) + 5 + 1);
|
||||||
sprintf (path_env, "PATH=%s", path_val);
|
strcpy (path_env, "PATH=");
|
||||||
|
strcat (path_env, path_val);
|
||||||
putenv (path_env);
|
putenv (path_env);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue