mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-23 21:17:52 +00:00
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:
parent
72e5c9daf2
commit
89e37b4c7a
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user