Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151045936
D53294.id164867.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
961 B
Referenced Files
None
Subscribers
None
D53294.id164867.diff
View Options
diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr
--- a/libexec/rc/rc.subr
+++ b/libexec/rc/rc.subr
@@ -792,31 +792,21 @@
#
wait_for_pids()
{
- local _list _prefix _nlist _j
+ local _list _prefix _j
- _list="$@"
+ for _j ; do
+ if kill -0 $_j 2>/dev/null; then
+ _list="${_list}${_list:+ }$_j"
+ fi
+ done
if [ -z "$_list" ]; then
return
fi
_prefix=
- while true; do
- _nlist=""
- for _j in $_list; do
- if kill -0 $_j 2>/dev/null; then
- _nlist="${_nlist}${_nlist:+ }$_j"
- fi
- done
- if [ -z "$_nlist" ]; then
- break
- fi
- _list=$_nlist
+ while [ -z "$_list" ]; do
echo -n ${_prefix:-"Waiting for PIDS: "}$_list
_prefix=", "
- pwait -o $_list 2>/dev/null
- # At least one of the processes we were waiting for
- # has terminated. Give init a chance to collect it
- # before looping around and checking again.
- sleep 1
+ _list=$(pwait -op $_list 2>/dev/null)
done
if [ -n "$_prefix" ]; then
echo "."
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 6, 3:32 PM (1 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30981073
Default Alt Text
D53294.id164867.diff (961 B)
Attached To
Mode
D53294: rc.subr: Fix slow shutdown issue
Attached
Detach File
Event Timeline
Log In to Comment