Allow processes to request the delivery of a signal upon death
of their parent process. This provides approximately the same
behaviour as prctl(PR_SET_PDEATHSIG, ...) on Linux.
As discussed on freebsd-hackers:
Differential D15106
Add PROC_PDEATHSIG_SET to procctl interface. munro_ip9.org on Apr 16 2018, 8:28 PM. Authored by Tags None Referenced Files
Details
Allow processes to request the delivery of a signal upon death As discussed on freebsd-hackers: ATF tests are included.
Diff Detail
Event TimelineComment Actions It looks fine overall, please look at several minor comments I posted. I will wait some more days for more opinions and suggestions before committing.
Comment Actions Updated documentation and moved PDEATHSIG handling into its own switch, as requested. Comment Actions I only have cosmetic remarks. Definitely looks good enough to be shipped.
Comment Actions Thanks for the reviews and help!
Comment Actions Use 'p' instead of td->td_proc in one more place that I'd missed. (Thanks to mjg for prod via IRC.) Sorry for the churn. Comment Actions The code itself looks good, but something could be improved in the man page and test.
Comment Actions Used _exit(0) to exit the tests's subprocesses successfully. Use sigwait to wait for signals synchronously. Documentation tweaks. Comment Actions The "fork_no_inherit" and "exec_inherit" tests' child processes also need to call _exit(0), so here's a new version to do that. Thanks for the review jilles. I agree the tests look much better with those changes.
|