From owner-freebsd-bugs@FreeBSD.ORG Tue Jan 2 11:10:23 2007 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8216416A403 for ; Tue, 2 Jan 2007 11:10:23 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 3367213C457 for ; Tue, 2 Jan 2007 11:10:23 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l02BANQp094723 for ; Tue, 2 Jan 2007 11:10:23 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l02BANNB094720; Tue, 2 Jan 2007 11:10:23 GMT (envelope-from gnats) Date: Tue, 2 Jan 2007 11:10:23 GMT Message-Id: <200701021110.l02BANNB094720@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: David Xu Cc: Subject: Re: kern/72979: unkillable process(es) stuck in `STOP' state X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: David Xu List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2007 11:10:23 -0000 The following reply was made to PR kern/72979; it has been noted by GNATS. From: David Xu To: "Andrew Pantyukhin" Cc: bug-followup@freebsd.org, "Mikhail Teterin" 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);