diff options
author | Rob Landley <rob@landley.net> | 2021-08-16 03:06:08 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2021-08-16 03:06:08 -0500 |
commit | f37e5bf24540ff3435734df8100416f404422662 (patch) | |
tree | 7977c038479c47dc3894759c1e1ccd9b77425807 /scripts | |
parent | e22443c6332c7ce2e38b395cd397b9b0da6b5145 (diff) | |
download | toybox-f37e5bf24540ff3435734df8100416f404422662.tar.gz |
People still using Centos 7 asked for some bug workarounds.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/make.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/make.sh b/scripts/make.sh index 1aecaec4..8534ae9e 100755 --- a/scripts/make.sh +++ b/scripts/make.sh @@ -14,6 +14,9 @@ if [ ! -z "$ASAN" ]; then export ASAN_OPTIONS="detect_leaks=0" fi +# Centos 7 bug workaround, EOL June 30 2024. +unset DASHN; wait -n 2>/dev/null; [ $? -eq 2 ] || DASHN=-n + export LANG=c export LC_ALL=C set -o pipefail @@ -302,14 +305,14 @@ do do_loudly $BUILD -c $i -o $OUT & # ratelimit to $CPUS many parallel jobs, detecting errors - [ $((++COUNT)) -ge $CPUS ] && { wait -n; DONE=$?; : $((--COUNT)); } + [ $((++COUNT)) -ge $CPUS ] && { wait $DASHN; DONE=$?; : $((--COUNT)); } [ $DONE -ne 0 ] && break done # wait for all background jobs, detecting errors while [ $((COUNT--)) -gt 0 ] do - wait -n; + wait $DASHN; DONE=$((DONE+$?)) done [ $DONE -ne 0 ] && exit 1 |