From owner-cvs-src@FreeBSD.ORG Mon May 14 22:21:59 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3720D16A405; Mon, 14 May 2007 22:21:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 1139113C458; Mon, 14 May 2007 22:21:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l4EMLwov018965; Mon, 14 May 2007 22:21:58 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l4EMLwm1018961; Mon, 14 May 2007 22:21:58 GMT (envelope-from jhb) Message-Id: <200705142221.l4EMLwm1018961@repoman.freebsd.org> From: John Baldwin Date: Mon, 14 May 2007 22:21:58 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/kern kern_exit.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2007 22:21:59 -0000 jhb 2007-05-14 22:21:58 UTC FreeBSD src repository Modified files: sys/kern kern_exit.c Log: Move cpu_exit() earlier in exit1() to close a race between SIGCHLD/kevent(2) notification of process termination and wait(). Now we no longer drop locks between sending the notification and marking the process as a zombie. Previously, if another process attempted to do a wait() with W_NOHANG after receiving a SIGCHLD or kevent and locked the process while the exiting thread was in cpu_exit(), then wait() would fail to find the process, which is quite astonishing to the process calling wait(). MFC after: 3 days Revision Changes Path 1.298 +10 -16 src/sys/kern/kern_exit.c