aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Program.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Program.cpp b/src/Program.cpp
index 33f5cd0..736532e 100644
--- a/src/Program.cpp
+++ b/src/Program.cpp
@@ -230,8 +230,8 @@ int exec_program_async(const char **args, pid_t *result_process_id) {
} else { /* parent */
if(result_process_id)
*result_process_id = pid;
-
- waitpid(pid, nullptr, 0);
+ else
+ waitpid(pid, nullptr, 0);
}
return 0;
}