diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2012-02-10 00:02:13 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2012-02-10 00:02:13 +0000 |
commit | db3273398b408f29b088b0b4ceaf65ce1a58d936 (patch) | |
tree | 6c1604f05fbb306e388325c5cec342e42e38433c /sys/kern/sys_process.c | |
parent | 3e7cc3cab317ccb1a20026e13b4bef3810af863c (diff) | |
download | src-db3273398b408f29b088b0b4ceaf65ce1a58d936.tar.gz src-db3273398b408f29b088b0b4ceaf65ce1a58d936.zip |
Mark the automatically attached child with PL_FLAG_CHILD in struct
lwpinfo flags, for PT_FOLLOWFORK auto-attachment.
In collaboration with: Dmitry Mikulin <dmitrym juniper net>
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=231320
Diffstat (limited to 'sys/kern/sys_process.c')
-rw-r--r-- | sys/kern/sys_process.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 451038036da0..2060efe6a337 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -1145,6 +1145,8 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data) pl->pl_flags |= PL_FLAG_FORKED; pl->pl_child_pid = td2->td_dbg_forked; } + if (td2->td_dbgflags & TDB_CHILD) + pl->pl_flags |= PL_FLAG_CHILD; pl->pl_sigmask = td2->td_sigmask; pl->pl_siglist = td2->td_siglist; strcpy(pl->pl_tdname, td2->td_name); |