qrexec: do not wait for local process if no one exists

This commit is contained in:
Marek Marczykowski-Górecki 2015-03-20 12:05:48 +01:00
parent 9fe45aeae5
commit b718747c09

View File

@ -80,7 +80,7 @@ int main(int argc, char **argv)
int ret, i;
int start_local_process = 0;
char *abs_exec_path;
pid_t child_pid;
pid_t child_pid = 0;
int inpipe[2], outpipe[2];
char pid_s[10];
@ -169,7 +169,8 @@ int main(int argc, char **argv)
}
close(trigger_fd);
waitpid(child_pid, &i, 0);
if (start_local_process)
waitpid(child_pid, &i, 0);
return ret;
}