Date: Tue, 2 Jan 2007 11:10:23 GMT From: David Xu <davidxu@freebsd.org> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/72979: unkillable process(es) stuck in `STOP' state Message-ID: <200701021110.l02BANNB094720@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/72979; it has been noted by GNATS.
From: David Xu <davidxu@freebsd.org>
To: "Andrew Pantyukhin" <infofarmer@freebsd.org>
Cc: bug-followup@freebsd.org,
"Mikhail Teterin" <mi@freebsd.org>
Subject: Re: kern/72979: unkillable process(es) stuck in `STOP' state
Date: Tue, 2 Jan 2007 19:09:15 +0800
I have updated the patch, please use this patch instead:
Index: kern_exit.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/kern_exit.c,v
retrieving revision 1.294
diff -u -r1.294 kern_exit.c
--- kern_exit.c 25 Oct 2006 06:18:04 -0000 1.294
+++ kern_exit.c 2 Jan 2007 11:06:56 -0000
@@ -413,8 +413,12 @@
*/
sx_xlock(&proctree_lock);
q = LIST_FIRST(&p->p_children);
- if (q != NULL) /* only need this if any child is S_ZOMB */
+ if (q != NULL) { /* only need this if any child is S_ZOMB */
+ PROC_LOCK(initproc);
wakeup(initproc);
+ psignal(initproc, SIGCHLD);
+ PROC_UNLOCK(initproc);
+ }
for (; q != NULL; q = nq) {
nq = LIST_NEXT(q, p_sibling);
PROC_LOCK(q);
@@ -479,13 +483,16 @@
} else
mtx_unlock(&p->p_pptr->p_sigacts->ps_mtx);
- if (p->p_pptr == initproc)
- psignal(p->p_pptr, SIGCHLD);
- else if (p->p_sigparent != 0) {
+ if (p->p_pptr == initproc) {
+ wakeup(initproc);
+ psignal(initproc, SIGCHLD);
+ } else if (p->p_sigparent != 0) {
if (p->p_sigparent == SIGCHLD)
childproc_exited(p);
- else /* LINUX thread */
+ else { /* LINUX thread */
+ wakeup(p->p_pptr);
psignal(p->p_pptr, p->p_sigparent);
+ }
}
PROC_UNLOCK(p->p_pptr);
PROC_UNLOCK(p);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701021110.l02BANNB094720>
