From 1926a14860ded08e9877d6b3c201b220606db808 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?= Date: Wed, 13 Apr 2022 14:56:06 -0500 Subject: [PATCH] ignore SIGCHLD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Leonardo Hernández Hernández --- src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index e1bde19..697909b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -494,6 +494,12 @@ int main(int argc, char* argv[]) diesys("sigaction"); } + struct sigaction chld_handler = {}; + chld_handler.sa_handler = SIG_IGN; + if (sigaction(SIGCHLD, &chld_handler, nullptr) < 0) { + die("sigaction"); + } + pollfds.push_back({ .fd = signalSelfPipe[0], .events = POLLIN,