diff options
author | jhb <jhb@FreeBSD.org> | 2002-04-16 17:11:34 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2002-04-16 17:11:34 +0000 |
commit | dba04cd736d55f53d6db22e89a37b13ba56eb759 (patch) | |
tree | 0dbfaf0504ea8a7e7591f231c8e177a948a68da3 /sys/kern/kern_sig.c | |
parent | 6cbba0bb0370167bd9f9a0d6ef843373f6b8f1c0 (diff) | |
download | FreeBSD-src-dba04cd736d55f53d6db22e89a37b13ba56eb759.zip FreeBSD-src-dba04cd736d55f53d6db22e89a37b13ba56eb759.tar.gz |
Lock proctree_lock instead of pgrpsess_lock.
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r-- | sys/kern/kern_sig.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index f64e0ec..0011039 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1019,7 +1019,7 @@ killpg1(td, sig, pgid, all) } sx_sunlock(&allproc_lock); } else { - PGRPSESS_SLOCK(); + sx_slock(&proctree_lock); if (pgid == 0) { /* * zero pgid means send to my process group. @@ -1029,11 +1029,11 @@ killpg1(td, sig, pgid, all) } else { pgrp = pgfind(pgid); if (pgrp == NULL) { - PGRPSESS_SUNLOCK(); + sx_sunlock(&proctree_lock); return (ESRCH); } } - PGRPSESS_SUNLOCK(); + sx_sunlock(&proctree_lock); LIST_FOREACH(p, &pgrp->pg_members, p_pglist) { PROC_LOCK(p); if (p->p_pid <= 1 || p->p_flag & P_SYSTEM) { @@ -1145,9 +1145,9 @@ gsignal(pgid, sig) struct pgrp *pgrp; if (pgid != 0) { - PGRPSESS_SLOCK(); + sx_slock(&proctree_lock); pgrp = pgfind(pgid); - PGRPSESS_SUNLOCK(); + sx_sunlock(&proctree_lock); if (pgrp != NULL) { pgsignal(pgrp, sig, 0); PGRP_UNLOCK(pgrp); |