Bug fix: If the envp argument for PR_CreateProcess is NULL,

call execv (instead of execve) so that the new process inherits
the environment of the parent process.
This commit is contained in:
wtc%netscape.com 1998-09-20 00:21:35 +00:00
parent 72e5c9daf2
commit 89e37b4c7a

View File

@ -176,7 +176,12 @@ ForkAndExec(
}
}
(void)execve(path, argv, envp);
if (envp) {
(void)execve(path, argv, envp);
} else {
/* Inherit the environment of the parent. */
(void)execv(path, argv);
}
/* Whoops! It returned. That's a bad sign. */
_exit(1);
}