From owner-svn-src-stable@FreeBSD.ORG Sun Mar 28 23:10:41 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 91F4A1065673 for ; Sun, 28 Mar 2010 23:10:41 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 3A6088FC1E for ; Sun, 28 Mar 2010 23:10:40 +0000 (UTC) Received: (qmail 19358 invoked by uid 399); 28 Mar 2010 23:10:40 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 28 Mar 2010 23:10:40 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4BAFE1EE.9040908@FreeBSD.org> Date: Sun, 28 Mar 2010 16:10:38 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.7) Gecko/20100218 Thunderbird/3.0.1 MIME-Version: 1.0 To: Jilles Tjoelker References: <201003282019.o2SKJfPg033857@svn.freebsd.org> <4BAFBBFA.7020701@FreeBSD.org> <20100328210630.GA2086@stack.nl> In-Reply-To: <20100328210630.GA2086@stack.nl> X-Enigmail-Version: 1.0.1 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 23:10:41 -0000 On 03/28/10 14:06, Jilles Tjoelker wrote: > 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. The process that I see this with most often is devd, does that fit the model you're describing? What are the implications of moving on after a successful pwait even though there is still a zombie process? > 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 It can't be break, the point of the loop is that wait_for_pids() takes a list. We may be able to use continue however. Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/