diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/program.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/program.c b/src/program.c index 56f65c1..49a92a3 100644 --- a/src/program.c +++ b/src/program.c @@ -73,12 +73,12 @@ int program_exec(const char **args, ProgramOutputCallback output_callback, void } else if(pid == 0) { /* child */ if(prctl(PR_SET_PDEATHSIG, SIGTERM) == -1) { perror("prctl(PR_SET_PDEATHSIG, SIGTERM) failed"); - exit(127); + _exit(127); } /* Test if the parent died before the above call to prctl */ if(getppid() != parent_pid) - exit(127); + _exit(127); dup2(fd[WRITE_END], STDOUT_FILENO); close(fd[READ_END]); @@ -86,7 +86,7 @@ int program_exec(const char **args, ProgramOutputCallback output_callback, void execvp(args[0], (char* const*)args); perror("execvp"); - exit(127); + _exit(127); } else { /* parent */ close(fd[WRITE_END]); @@ -146,12 +146,12 @@ int program_exec_async(const char **args, int *process_id, int *stdin_file, int } else if(pid == 0) { /* child */ if(prctl(PR_SET_PDEATHSIG, SIGTERM) == -1) { perror("prctl(PR_SET_PDEATHSIG, SIGTERM) failed"); - exit(127); + _exit(127); } /* Test if the parent died before the above call to prctl */ if(getppid() != parent_pid) - exit(127); + _exit(127); if(stdin_file) { dup2(stdin_fd[READ_END], STDIN_FILENO); @@ -167,7 +167,7 @@ int program_exec_async(const char **args, int *process_id, int *stdin_file, int execvp(args[0], (char* const*)args); perror("execvp"); - exit(127); + _exit(127); } else { /* parent */ if(process_id) *process_id = pid; |