diff options
author | jhb <jhb@FreeBSD.org> | 2001-04-24 00:51:53 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-04-24 00:51:53 +0000 |
commit | 9c03a8ae91e06e47f0c59996ef0e2300e231e101 (patch) | |
tree | ec00c764b1eb58ed4297070edb5806ffd7ca4765 /sys/compat/svr4/svr4_misc.c | |
parent | 383dd0a2656889604bb7eb71b993875024ddd832 (diff) | |
download | FreeBSD-src-9c03a8ae91e06e47f0c59996ef0e2300e231e101.zip FreeBSD-src-9c03a8ae91e06e47f0c59996ef0e2300e231e101.tar.gz |
Change the pfind() and zpfind() functions to lock the process that they
find before releasing the allproc lock and returning.
Reviewed by: -smp, dfr, jake
Diffstat (limited to 'sys/compat/svr4/svr4_misc.c')
-rw-r--r-- | sys/compat/svr4/svr4_misc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c index 7e6ddd7..8a35e84 100644 --- a/sys/compat/svr4/svr4_misc.c +++ b/sys/compat/svr4/svr4_misc.c @@ -1010,6 +1010,7 @@ svr4_sys_pgrpsys(p, uap) * the session leader. */ *retval = (register_t) p->p_session->s_leader->p_pid; + PROC_UNLOCK(p); return 0; case 3: /* setsid() */ @@ -1022,6 +1023,7 @@ svr4_sys_pgrpsys(p, uap) return ESRCH; *retval = (int) p->p_pgrp->pg_id; + PROC_UNLOCK(p); return 0; case 5: /* setpgid(pid, pgid); */ @@ -1264,11 +1266,10 @@ loop: q->p_oppid = 0; q->p_flag &= ~(P_TRACED | P_WAITED); PROC_UNLOCK(q); - PROC_LOCK(t); psignal(t, SIGCHLD); + wakeup(t); PROC_UNLOCK(t); sx_xunlock(&proctree_lock); - wakeup(t); return 0; } } |