Details
Details
- Reviewers
markj jhb kib - Group Reviewers
manpages - Commits
- rGfd3ac06f452f: ptrace: add an option to not kill debuggees on debugger exit
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
Under what conditions would someone set kern_kill_on_dbg_exit=0? (Or, is a system-wide setting sufficient for all uses we'd envision?)
Comment Actions
I think this is a useful setting if you
- debug a debugger, and do not want the debuggee to be terminated on debugger crash (if you do want the system to automatically clean after crash, then the current behavior is fine)
- use tools like truss on important live process and do not want that a bug in truss or operator error resulted in killing of the process
I do not see how to make this setting more granular. Making it an option that can be set using ptrace(2) on specific debuggee is practically useless because you need to worry about it in advance.
Comment Actions
I would maybe move the sysctl to kern_exit.c and then you can make the knob static instead of a global. I think the change is fine.
Comment Actions
Drop any queued SIGTRAPs. They are typically generated by debugging events, but if debugger is killed before consuming them, child dies screaming.