From owner-svn-src-stable@FreeBSD.ORG Sun Mar 28 21:06:31 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F4DC1065670; Sun, 28 Mar 2010 21:06:31 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 458988FC0A; Sun, 28 Mar 2010 21:06:31 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 4E2B035A855; Sun, 28 Mar 2010 23:06:30 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1677) id 3B8B61735E; Sun, 28 Mar 2010 23:06:30 +0200 (CEST) Date: Sun, 28 Mar 2010 23:06:30 +0200 From: Jilles Tjoelker To: Doug Barton Message-ID: <20100328210630.GA2086@stack.nl> References: <201003282019.o2SKJfPg033857@svn.freebsd.org> <4BAFBBFA.7020701@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BAFBBFA.7020701@FreeBSD.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r205806 - stable/8/etc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2010 21:06:31 -0000 On Sun, Mar 28, 2010 at 01:28:42PM -0700, Doug Barton wrote: > Probably my fault for not saying something sooner, but there is a > problem with the code in head that sometimes causes it to loop > repeatedly even though pwait exits successfully. I am trying to track it > down, but since it only happens about once every 10 shutdowns it's been > difficult. There is a difference between the two methods in what is waited for exactly. pwait(1) will wait for the process to terminate; if it is applied to a zombie it will return immediately (printing the exit status if -v was given). On the other hand, kill(1) will continue to return success until the process has been waited for by its parent. An obvious fix is to trust pwait if it returns successfully, e.g. like if pwait $_list 2>/dev/null; then break; else sleep 2; fi -- Jilles Tjoelker