Commit 95a2d330 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Fix crash in timeout signal handler within testing/test_env.py

Noticed this from:
https://chromium-swarm.appspot.com/task?id=3e5bfa5ea894bf10&refresh=10&show_raw=1&wide_logs=true

Post stating it's win32 only:
https://github.com/python/mypy/issues/3872

Bug: 733612
Change-Id: I7bd8fc20e4793a225e093450ba902ae525af8ac9
Reviewed-on: https://chromium-review.googlesource.com/1117858Reviewed-by: default avatarBen Pastene <bpastene@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: agrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570999}
parent ba4cfa8e
......@@ -204,7 +204,8 @@ def forward_signals(procs):
assert all(isinstance(p, subprocess.Popen) for p in procs)
def _sig_handler(sig, _):
for p in procs:
if sig == signal.SIGBREAK:
# SIGBREAK is defined only for win32.
if sys.platform == 'win32' and sig == signal.SIGBREAK:
p.send_signal(signal.CTRL_BREAK_EVENT)
else:
p.send_signal(sig)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment