From 4603af2492b7d11f66f8c03e1b38b1429eaf799e Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 8 Jan 2024 20:02:15 +0100 Subject: waitpid after kill --- src/AsyncImageLoader.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/AsyncImageLoader.cpp') diff --git a/src/AsyncImageLoader.cpp b/src/AsyncImageLoader.cpp index 8b8c5f6..2b454da 100644 --- a/src/AsyncImageLoader.cpp +++ b/src/AsyncImageLoader.cpp @@ -399,6 +399,8 @@ namespace QuickMedia { std::lock_guard lock(download_mutex); if(download.read_program.pid != -1) { kill(download.read_program.pid, SIGTERM); + int status; + waitpid(download.read_program.pid, &status, 0); download.read_program.pid = -1; } if(download.read_program.read_fd != -1) { -- cgit v1.2.3