From b003080265399233aad7de08327e25513ccc9ebc Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 8 Jan 2024 20:09:31 +0100 Subject: Kill children --- src/Program.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Program.cpp') diff --git a/src/Program.cpp b/src/Program.cpp index de30e4f..70ac6e0 100644 --- a/src/Program.cpp +++ b/src/Program.cpp @@ -96,7 +96,7 @@ public: it->second.program.write_fd = -1; } if(it->second.program.pid != -1) { - kill(it->second.program.pid, SIGTERM); + kill(it->second.program.pid, SIGKILL); int status; waitpid(it->second.program.pid, &status, 0); it->second.program.pid = -1; @@ -272,7 +272,7 @@ int exec_program_write_stdin(const char **args, const char *str, size_t size, Pr // TODO: Set program.pid to -1 and with currenthreadprogram mutex. Same in other places if(result != 0) - kill(program.pid, SIGTERM); + kill(program.pid, SIGKILL); if(waitpid(program.pid, &status, 0) == -1) { perror("waitpid failed"); @@ -344,7 +344,7 @@ int exec_program(const char **args, ProgramOutputCallback output_callback, void } if(result != 0) - kill(read_program.pid, SIGTERM); + kill(read_program.pid, SIGKILL); if(waitpid(read_program.pid, &status, 0) == -1) { perror("waitpid failed"); -- cgit v1.2.3