From b718747c09d8a6bdc73513c409fc793ec09d9562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 20 Mar 2015 12:05:48 +0100 Subject: [PATCH] qrexec: do not wait for local process if no one exists --- qrexec/qrexec-client-vm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qrexec/qrexec-client-vm.c b/qrexec/qrexec-client-vm.c index 0977d1f..bc95231 100644 --- a/qrexec/qrexec-client-vm.c +++ b/qrexec/qrexec-client-vm.c @@ -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; }