Date: Tue, 6 Apr 2010 05:20:46 +0000 (UTC) From: Doug Barton <dougb@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/etc rc.subr Message-ID: <201004060520.o365Kqvd076395@repoman.freebsd.org>
index | next in thread | raw e-mail
dougb 2010-04-06 05:20:46 UTC
FreeBSD src repository
Modified files:
etc rc.subr
Log:
SVN rev 206248 on 2010-04-06 05:20:46Z by dougb
In wait_for_pids(), pwait(1) can return when the process exits, but
still exists as a zombie. The 'kill -0' test in this function can
therefore return true even if the process isn't actually running.
This could lead to wait_for_pids() printing an endless string of the
pid number until the zombie finally exits.
Solve this problem by moving the sleep up to after the 'kill -0' test, but
only after we've run through the function once already. In the common case
(only one pid in the list) this will always do the right thing. On the rare
occasion that there is more than one pid in the list this will sleep 1
second per zombie process which will allow that process, and any other
in the list a chance to exit.
While I'm here, local'ize the variables that this function uses.
Revision Changes Path
1.100 +4 -1 src/etc/rc.subr
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004060520.o365Kqvd076395>
