mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-23 11:18:54 +00:00
Add comment from CSRG rev 7.27 (1992/06/23 19:56:55; author: mckusick)
This commit is contained in:
parent
5df88f46bb
commit
52e95a64ea
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=223212
@ -829,6 +829,15 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data)
|
||||
|
||||
case PT_ATTACH:
|
||||
/* security check done above */
|
||||
/*
|
||||
* It would be nice if the tracing relationship was separate
|
||||
* from the parent relationship but that would require
|
||||
* another set of links in the proc struct or for "wait"
|
||||
* to scan the entire proc table. To make life easier,
|
||||
* we just re-parent the process we're trying to trace.
|
||||
* The old parent is remembered so we can put things back
|
||||
* on a "detach".
|
||||
*/
|
||||
p->p_flag |= P_TRACED;
|
||||
p->p_oppid = p->p_pptr->p_pid;
|
||||
if (p->p_pptr != td->td_proc) {
|
||||
|
Loading…
Reference in New Issue
Block a user