Skip to content

Commit

Permalink
fix wait issue for old version of bash
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyukang committed Jun 23, 2024
1 parent b25452b commit 94bdd7d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/nodes/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ else
done
fi

# -n means we will exit when any of the background processes exits.
# https://www.gnu.org/software/bash/manual/bash.html#index-wait
wait -n
# we will exit when any of the background processes exits.
while true; do
for job in $(jobs -p); do
wait $job || exit 1
done
sleep 1
done

0 comments on commit 94bdd7d

Please sign in to comment.