git: cc123f0dba83 - stable/13 - daemon: initialize mask_orig with sigemptyset()

From: Kyle Evans <kevans_at_FreeBSD.org>
Date: Fri, 17 Mar 2023 21:01:25 UTC
The branch stable/13 has been updated by kevans:

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

commit cc123f0dba83a403db6978cae2232cbbf6ec7f48
Author:     Ihor Antonov <ihor@antonovs.family>
AuthorDate: 2023-03-02 03:00:41 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2023-03-17 21:01:01 +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
    
    (cherry picked from commit 84866cefdfb78488543056173aea78748b77159b)
---
 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) {