From 315fba5d21d87ddb756d4bebdb49f99d86b0ffe8 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 13 Nov 2024 17:19:47 +0000 Subject: [PATCH] process: avoid zombies fixes #20 --- src/os/Process.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/os/Process.cpp b/src/os/Process.cpp index 8fcd16d..e415129 100644 --- a/src/os/Process.cpp +++ b/src/os/Process.cpp @@ -142,6 +142,9 @@ bool Hyprutils::OS::CProcess::runSync() { close(outPipe[0]); close(errPipe[0]); + // reap child + waitpid(pid, nullptr, 0); + return true; }