Skip to content

Commit 81c553e

Browse files
committed
fix: stop docker build commands by pid and group
1 parent 0fc5a57 commit 81c553e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

scripts/lib/docker-build.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,10 @@ docker_build_run_logged() {
152152
fi
153153
done < <(pgrep -P "$process_id" 2>/dev/null || true)
154154
fi
155-
kill -s "$signal" -- "-$process_id" 2>/dev/null ||
156-
kill -s "$signal" "$process_id" 2>/dev/null ||
157-
true
155+
# A successful group signal does not prove this exact PID was in that group;
156+
# send both so timeout/build wrappers cannot exit while their command stays alive.
157+
kill -s "$signal" -- "-$process_id" 2>/dev/null || true
158+
kill -s "$signal" "$process_id" 2>/dev/null || true
158159
}
159160

160161
docker_build_stop_tracked_build() {

0 commit comments

Comments
 (0)