aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/process.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-03-14 09:48:15 +0100
committerDan Engelbrecht <[email protected]>2025-03-14 09:48:15 +0100
commit18aeb8856dc168336955f0d2778cdc74c64a680f (patch)
tree83932b76bb01d1a9e9b473bf5bbc36cfca1c2b5b /src/zencore/process.cpp
parentMerge remote-tracking branch 'origin/main' into de/zen-service-command (diff)
parentMerge pull request #288 from ue-foundation/lm/zen-service-command (diff)
downloadzen-18aeb8856dc168336955f0d2778cdc74c64a680f.tar.xz
zen-18aeb8856dc168336955f0d2778cdc74c64a680f.zip
Merge remote-tracking branch 'origin/de/zen-service-command' into de/zen-service-command
Diffstat (limited to 'src/zencore/process.cpp')
-rw-r--r--src/zencore/process.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/zencore/process.cpp b/src/zencore/process.cpp
index 004b36dca..079e2db3f 100644
--- a/src/zencore/process.cpp
+++ b/src/zencore/process.cpp
@@ -24,7 +24,6 @@
# include <sys/sem.h>
# include <sys/stat.h>
# include <sys/syscall.h>
-# include <sys/sysctl.h>
# include <sys/wait.h>
# include <time.h>
# include <unistd.h>
@@ -41,7 +40,9 @@ ZEN_THIRD_PARTY_INCLUDES_END
namespace zen {
#if ZEN_PLATFORM_LINUX
-const bool bNoZombieChildren = []() {
+void
+IgnoreChildSignals()
+{
// When a child process exits it is put into a zombie state until the parent
// collects its result. This doesn't fit the Windows-like model that Zen uses
// where there is a less strict familial model and no zombification. Ignoring
@@ -52,8 +53,7 @@ const bool bNoZombieChildren = []() {
sigemptyset(&Action.sa_mask);
Action.sa_handler = SIG_IGN;
sigaction(SIGCHLD, &Action, nullptr);
- return true;
-}();
+}
static char
GetPidStatus(int Pid, std::error_code& OutEc)