[Bug 250386] procctl(P_PID, 0, PROC_PDEATHSIG_CTL, &signum) doesn't work on 12.2-STABLE

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Oct 16 03:24:50 UTC 2020


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

            Bug ID: 250386
           Summary: procctl(P_PID, 0, PROC_PDEATHSIG_CTL, &signum) doesn't
                    work on 12.2-STABLE
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs at FreeBSD.org
          Reporter: yuri at freebsd.org

In the child process I have these lines:

> int signum = SIGKILL;
> if (::procctl(P_PID, 0, PROC_PDEATHSIG_CTL, &signum) == -1)
>     exit(1);

Parent launches this process, it loops, and then the parent exits.

The child process stays despite the above lines.

I expect it to receive SIGKILL and die once the parent exists, as per
procctl(2):
>      PROC_PDEATHSIG_CTL   Request the delivery of a signal when the parent of
>                           the calling process exits.  idtype must be P_PID and
>                           id must be the either caller's pid or zero, with no
>                           difference in effect.  The value is cleared for
>                           child processes and when executing set-user-ID or
>                           set-group-ID binaries.  arg must point to a value of
>                           type int indicating the signal that should be
>                           delivered to the caller.  Use zero to cancel a
>                           previously requested signal delivery.

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


More information about the freebsd-ports-bugs mailing list