commit | 95a2d330a7d9407936e1015a8b1ae4266150e827 | [log] [tgz] |
---|---|---|
author | Andrew Grieve <[email protected]> | Thu Jun 28 02:22:59 2018 |
committer | Commit Bot <[email protected]> | Thu Jun 28 02:22:59 2018 |
tree | 01e86f28617a405ec8c84f96aa6300a6ebcb68f1 | |
parent | ba4cfa8ea85018176af83062b37cc2c44c2fb279 [diff] [blame] |
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/1117858 Reviewed-by: Ben Pastene <[email protected]> Reviewed-by: Dirk Pranke <[email protected]> Commit-Queue: agrieve <[email protected]> Cr-Commit-Position: refs/heads/master@{#570999}
diff --git a/testing/test_env.py b/testing/test_env.py index 1b70351..bd0a874 100755 --- a/testing/test_env.py +++ b/testing/test_env.py
@@ -204,7 +204,8 @@ 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)