svn commit: r200818 - head/etc

Jilles Tjoelker jilles at FreeBSD.org
Mon Dec 21 22:16:07 UTC 2009


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 "."


More information about the svn-src-all mailing list