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.
Provide minimal but complete reproducer for the issue.