Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Sep 2018 22:10:57 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 231791] daemon utility doesn't redirect SIGTERM to child process
Message-ID:  <bug-231791-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help

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@FreeBSD.org
          Reporter: kuseni@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.


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-231791-227>