diff options
author | truckman <truckman@FreeBSD.org> | 2004-02-19 10:39:42 +0000 |
---|---|---|
committer | truckman <truckman@FreeBSD.org> | 2004-02-19 10:39:42 +0000 |
commit | 0dbd9a3b16f132e7511771e1ee508d097884a64c (patch) | |
tree | fd8bb1acc701b8b2ad20ea14400a3a96ad7014d3 /sys/kern/sys_process.c | |
parent | ab89ce797c28e5d26b40fb176973ff9775c1c895 (diff) | |
download | FreeBSD-src-0dbd9a3b16f132e7511771e1ee508d097884a64c.zip FreeBSD-src-0dbd9a3b16f132e7511771e1ee508d097884a64c.tar.gz |
When reparenting a process in the PT_DETACH code, only set p_sigparent
to SIGCHLD if the new parent process is initproc.
MFC after: 2 weeks
Diffstat (limited to 'sys/kern/sys_process.c')
-rw-r--r-- | sys/kern/sys_process.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 9a79551..7a0c02e 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -561,7 +561,8 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data) PROC_UNLOCK(pp); PROC_LOCK(p); proc_reparent(p, pp); - p->p_sigparent = SIGCHLD; + if (pp == initproc) + p->p_sigparent = SIGCHLD; } p->p_flag &= ~(P_TRACED | P_WAITED); p->p_oppid = 0; |