aboutsummaryrefslogtreecommitdiff
path: root/src/Program.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Program.c')
-rw-r--r--src/Program.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Program.c b/src/Program.c
index 0ad19f2..2307798 100644
--- a/src/Program.c
+++ b/src/Program.c
@@ -116,26 +116,26 @@ int wait_program(pid_t process_id) {
return WEXITSTATUS(status);
}
-bool wait_program_non_blocking(pid_t process_id, int *status) {
+int wait_program_non_blocking(pid_t process_id, int *status) {
int s;
int wait_result = waitpid(process_id, &s, WNOHANG);
if(wait_result == -1) {
perror("waitpid failed");
*status = -errno;
- return false;
+ return 0;
} else if(wait_result == 0) {
/* the child process is still running */
*status = 0;
- return false;
+ return 0;
}
if(!WIFEXITED(s)) {
*status = -4;
- return false;
+ return 0;
}
*status = WEXITSTATUS(s);
- return true;
+ return 1;
}
int exec_program_async(const char **args, pid_t *result_process_id) {