From 84866cefdfb78488543056173aea78748b77159b Mon Sep 17 00:00:00 2001 From: Ihor Antonov Date: Wed, 1 Mar 2023 21:00:41 -0600 Subject: [PATCH] daemon: initialize mask_orig with sigemptyset() consolidation of variable declarations and initializations in previous commit allowed me to detect that one of the signal masks is not properly initialized with sigemptyset (as man 3 sigsetops demands) Reviewed by: kevans Pull Request: https://github.com/freebsd/freebsd-src/pull/669 --- usr.sbin/daemon/daemon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/daemon/daemon.c b/usr.sbin/daemon/daemon.c index c8ccd8f892fa..9477b2a415e8 100644 --- a/usr.sbin/daemon/daemon.c +++ b/usr.sbin/daemon/daemon.c @@ -171,6 +171,7 @@ main(int argc, char *argv[]) sigemptyset(&mask_susp); sigemptyset(&mask_read); sigemptyset(&mask_term); + sigemptyset(&mask_orig); while ((ch = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) { switch (ch) {