diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2025-09-23 12:55:56 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2025-09-23 12:55:56 +0000 |
| commit | 5953e7c98427e038500221e885dffa181dcc064b (patch) | |
| tree | 401c4e660375fcc1c2d1b1d121b7caed354cd013 /libexec | |
| parent | 99475087d63b4602a0213645bc17d82c3946e2fd (diff) | |
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/rc/rc.subr | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index 06b1bd51384c..6be226021949 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -804,7 +804,6 @@ wait_for_pids() for _j in $_list; do if kill -0 $_j 2>/dev/null; then _nlist="${_nlist}${_nlist:+ }$_j" - [ -n "$_prefix" ] && sleep 1 fi done if [ -z "$_nlist" ]; then @@ -814,6 +813,10 @@ wait_for_pids() 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 done if [ -n "$_prefix" ]; then echo "." |
