aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/process.cpp
diff options
context:
space:
mode:
authorLiam Mitchell <[email protected]>2025-02-27 02:16:10 +0000
committerLiam Mitchell <[email protected]>2025-02-27 02:16:10 +0000
commitc49b0a053c5e28de1afa83600ebffd383766e38a (patch)
tree3b9e7880e09ff816edd1fc9f996015ed9e6ee522 /src/zencore/process.cpp
parentLinux compilation fixes (diff)
downloadzen-c49b0a053c5e28de1afa83600ebffd383766e38a.tar.xz
zen-c49b0a053c5e28de1afa83600ebffd383766e38a.zip
Implementation of service commands for Linux.
Diffstat (limited to 'src/zencore/process.cpp')
-rw-r--r--src/zencore/process.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/zencore/process.cpp b/src/zencore/process.cpp
index 8dc86371e..9f0c9578f 100644
--- a/src/zencore/process.cpp
+++ b/src/zencore/process.cpp
@@ -40,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
@@ -51,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)