aboutsummaryrefslogtreecommitdiff
path: root/zencore/thread.cpp
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2022-02-22 09:08:40 +0100
committerMartin Ridgers <[email protected]>2022-02-22 09:19:19 +0100
commit585b89592e4a00962f41002494bc03cbaae3dfe3 (patch)
tree580b7c52d408d757560fb7e3e2a0a12eefc95d28 /zencore/thread.cpp
parentRemoved using enum statements. (diff)
downloadzen-585b89592e4a00962f41002494bc03cbaae3dfe3.tar.xz
zen-585b89592e4a00962f41002494bc03cbaae3dfe3.zip
Use sigaction() instead of the deprecated sigignore()
Diffstat (limited to 'zencore/thread.cpp')
-rw-r--r--zencore/thread.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/zencore/thread.cpp b/zencore/thread.cpp
index 527938cf3..7b1396f5f 100644
--- a/zencore/thread.cpp
+++ b/zencore/thread.cpp
@@ -82,7 +82,10 @@ const bool bNoZombieChildren = [] () {
// SIGCHLD siganals removes the need to call wait() on zombies. Another option
// would be for the child to call setsid() but that would detatch the child
// from the terminal.
- sigignore(SIGCHLD);
+ struct sigaction Action = {};
+ sigemptyset(&Action.sa_mask);
+ Action.sa_handler = SIG_IGN;
+ sigaction(SIGCHLD, &Action, nullptr);
return true;
} ();
#endif