From c0c608cad7f66d2c783ef7229fcc69e8307e0639 Mon Sep 17 00:00:00 2001 From: Andrei E Date: Sat, 9 Mar 2024 14:43:16 +0000 Subject: [PATCH] Move SIGCHLD to client launch --- client/bemenu-run.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client/bemenu-run.c b/client/bemenu-run.c index 0084aa0..b44331b 100644 --- a/client/bemenu-run.c +++ b/client/bemenu-run.c @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -132,6 +133,14 @@ static inline void ignore_ret(int useless, ...) { (void)useless; } static void launch(const struct client *client, const char *bin) { + struct sigaction action = { + .sa_handler = SIG_DFL, + .sa_flags = SA_NOCLDWAIT + }; + + // do not care about childs + sigaction(SIGCHLD, &action, NULL); + if (!bin) return;