Fix displaying error message when parent enviornment can'be restored

This commit is contained in:
Ilya Fedin 2020-05-07 16:18:40 +04:00
parent b2ac83a76e
commit 3c85647826

4
exec.c
View file

@ -81,10 +81,10 @@ static int exec_common(execve_func_t function, const char *filename, char* const
if (is_external_process(fullpath)) {
DEBUG("External process detected. Restoring env vars from parent %d\n", get_parent_pid());
env = read_parent_env();
if (!env)
if (!env) {
env = envp;
else
DEBUG("Error restoring env vars from parent\n");
}
}
int ret = function(filename, argv, env);