Unfortunately, the previous method is not optimal because SIGKILL cannot be intercepted. One could however call prctl.set_pdeathsig() (analogous to PR_SET_PDEATHSIG of prctl(2)) after forking in the child process.
Unfortunately, the previous method is not optimal because SIGKILL cannot be intercepted. One could however call prctl.set_ pdeathsig( ) (analogous to PR_SET_PDEATHSIG of prctl(2)) after forking in the child process.