[Bug 231791] daemon utility doesn't redirect SIGTERM to child process

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Sep 28 22:10:59 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=231791

            Bug ID: 231791
           Summary: daemon utility doesn't redirect SIGTERM to child
                    process
           Product: Base System
           Version: 11.2-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs at FreeBSD.org
          Reporter: kuseni at gmail.com

daemon utility doesn't redirect SIGTERM to child process. I think, the problem
is in the confused handlers of SIGTERM and SIGCHLD signals, see lines 207-215
of https://github.com/freebsd/freebsd/blob/master/usr.sbin/daemon/daemon.c :

memset(&act_term, 0, sizeof(act_term));
act_term.sa_handler = handle_term;
sigemptyset(&act_term.sa_mask);
sigaddset(&act_term.sa_mask, SIGCHLD);

memset(&act_chld, 0, sizeof(act_chld));
act_chld.sa_handler = handle_chld;
sigemptyset(&act_chld.sa_mask);
sigaddset(&act_chld.sa_mask, SIGTERM);

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list