git: 84866cefdfb7 - main - daemon: initialize mask_orig with sigemptyset()

From: Kyle Evans <kevans_at_FreeBSD.org>
Date: Thu, 02 Mar 2023 03:01:01 UTC
The branch main has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=84866cefdfb78488543056173aea78748b77159b

commit 84866cefdfb78488543056173aea78748b77159b
Author:     Ihor Antonov <ihor@antonovs.family>
AuthorDate: 2023-03-02 03:00:41 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2023-03-02 03:00:41 +0000

    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) {