diff options
author | Bryan Drewery <bryan@shatow.net> | 2021-10-26 06:36:42 +0300 |
---|---|---|
committer | Bryan Drewery <bryan@shatow.net> | 2021-10-26 07:00:18 +0300 |
commit | d4d40746ff8f51daef65dac5c89aea6e71ece504 (patch) | |
tree | e943d7d6ca3b051ab9d11c15fa228a1fa5a5a5a7 | |
parent | 7a7152ce2d5a8081abd94ae9c773b6779c02c763 (diff) |
Actually fix pid pwaiting.
This probably _never_ worked so add a low timeout too.
Fixes: 855b17c59b7
-rw-r--r-- | src/share/poudriere/common.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/share/poudriere/common.sh b/src/share/poudriere/common.sh index bfa47bc9..de70e425 100644 --- a/src/share/poudriere/common.sh +++ b/src/share/poudriere/common.sh @@ -4585,8 +4585,10 @@ stop_builders() { local PARALLEL_JOBS real_parallel_jobs pid # wait for the last running processes - find "${MASTER_DATADIR}/var/run/" -name "*.pid" -print0 | - xargs -0 pwait 2>/dev/null + # the pidfiles may not contain an EOF newline so awk fixes that + find "${MASTER_DATADIR}/var/run/" -name "*.pid" -exec \ + awk '{print}' {} + | + xargs pwait -t 20 2>/dev/null || : if [ ${PARALLEL_JOBS} -ne 0 ]; then msg "Stopping ${PARALLEL_JOBS} builders" |