From 585b89592e4a00962f41002494bc03cbaae3dfe3 Mon Sep 17 00:00:00 2001 From: Martin Ridgers Date: Tue, 22 Feb 2022 09:08:40 +0100 Subject: Use sigaction() instead of the deprecated sigignore() --- zencore/thread.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'zencore/thread.cpp') 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 -- cgit v1.2.3