From f7d1569113110ea8df071d2ea64fd17aaf5b42c9 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 3 Nov 2023 22:24:04 +0100 Subject: [PATCH] uloop: properly initialize signal handler mask The structure passed to `sigaction()` left it's `sa_mask` member uninitialized. Fixes: beb356b ("uloop: add support for user defined signal handlers") Signed-off-by: Jo-Philipp Wich --- uloop.c | 1 + 1 file changed, 1 insertion(+) diff --git a/uloop.c b/uloop.c index 89a7029..63428db 100644 --- a/uloop.c +++ b/uloop.c @@ -568,6 +568,7 @@ int uloop_signal_add(struct uloop_signal *s) if (s->orig.sa_handler != uloop_signal_wake) { sa.sa_handler = uloop_signal_wake; sa.sa_flags = 0; + sigemptyset(&sa.sa_mask); sigaction(s->signo, &sa, NULL); }