Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle SIGWINCH under bazel run correctly. #17301

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions tools/test/test-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,13 @@ cleanupPid=$!

set +m

wait $childPid
# If interrupted by a signal, use the signal as the exit code. But allow
# the child to actually finish from the signal we sent _it_ via signal_child.
# (Waiting on a stopped process is a no-op).
# Only once - if we receive multiple signals (of any sort), give up.
exitCode=$?
wait $childPid
# Wait until $childPid fully exits.
# We need to wait in a loop because wait is interrupted by any incoming trapped
# signal (https://www.gnu.org/software/bash/manual/bash.html#Signals).
while kill -0 $childPid 2>/dev/null; do
wait $childPid
exitCode=$?
done

# By this point, we have everything we're willing to wait for. Tidy up our own
# processes and move on.
Expand Down