Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Dec 2009 22:16:07 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r200818 - head/etc
Message-ID:  <200912212216.nBLMG7gl042491@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Mon Dec 21 22:16:07 2009
New Revision: 200818
URL: http://svn.freebsd.org/changeset/base/200818

Log:
  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
  Reviewed by:	dougb

Modified:
  head/etc/rc.subr

Modified: head/etc/rc.subr
==============================================================================
--- head/etc/rc.subr	Mon Dec 21 21:47:33 2009	(r200817)
+++ head/etc/rc.subr	Mon Dec 21 22:16:07 2009	(r200818)
@@ -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?200912212216.nBLMG7gl042491>