Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Mar 2010 20:19:41 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r205806 - stable/8/etc
Message-ID:  <201003282019.o2SKJfPg033857@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Sun Mar 28 20:19:41 2010
New Revision: 205806
URL: http://svn.freebsd.org/changeset/base/205806

Log:
  MFC r200818: rc.subr: Use pwait in wait_for_pids.
  
  This waits for the requested process(es) to terminate, rather than polling
  with an interval of 2 seconds.
  
  If pwait is not available, the old method is used.
  
  PR:		conf/132766

Modified:
  stable/8/etc/rc.subr
Directory Properties:
  stable/8/etc/   (props changed)

Modified: stable/8/etc/rc.subr
==============================================================================
--- stable/8/etc/rc.subr	Sun Mar 28 20:09:04 2010	(r205805)
+++ stable/8/etc/rc.subr	Sun Mar 28 20:19:41 2010	(r205806)
@@ -390,7 +390,7 @@ wait_for_pids()
 		_list=$_nlist
 		echo -n ${_prefix:-"Waiting for PIDS: "}$_list
 		_prefix=", "
-		sleep 2
+		pwait $_list 2>/dev/null || sleep 2
 	done
 	if [ -n "$_prefix" ]; then
 		echo "."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003282019.o2SKJfPg033857>