diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2012-04-11 15:28:51 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2012-04-11 15:28:51 +0000 |
commit | 86f02b900dd631fbf0aa31bede913fb0dafd8345 (patch) | |
tree | 130e8df9738ade3557faa105580a0ccf8cdd30bd /sys/kern/sys_process.c | |
parent | e51e64c1e1a3ed49446363def75895cbe6a6d2d4 (diff) |
Move the P_WAITED flag from struct proc to struct process.
ok guenther@
Diffstat (limited to 'sys/kern/sys_process.c')
-rw-r--r-- | sys/kern/sys_process.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 1610ad88f17..8f665600f1d 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_process.c,v 1.52 2012/04/06 20:28:51 kettenis Exp $ */ +/* $OpenBSD: sys_process.c,v 1.53 2012/04/11 15:28:50 kettenis Exp $ */ /* $NetBSD: sys_process.c,v 1.55 1996/05/15 06:17:47 tls Exp $ */ /*- @@ -270,8 +270,7 @@ sys_ptrace(struct proc *p, void *v, register_t *retval) /* * (3) it's not currently stopped. */ - if (t->p_stat != SSTOP || - !ISSET(tr->ps_mainproc->p_flag, P_WAITED)) + if (t->p_stat != SSTOP || !ISSET(tr->ps_flags, PS_WAITED)) return (EBUSY); break; @@ -485,8 +484,7 @@ sys_ptrace(struct proc *p, void *v, register_t *retval) /* not being traced any more */ tr->ps_oppid = 0; - atomic_clearbits_int(&tr->ps_flags, PS_TRACED); - atomic_clearbits_int(&t->p_flag, P_WAITED); + atomic_clearbits_int(&tr->ps_flags, PS_TRACED|PS_WAITED); sendsig: bzero(tr->ps_ptstat, sizeof(*tr->ps_ptstat)); |