apenwarr-redo/redo
Avery Pennarun 670abbe305 jobserver.py: _try_read()'s alarm timeout needs to throw an exception.
In python3, os.read() automatically retries after EINTR, which breaks
our ability to interrupt on SIGALRM.

Instead, throw an exception from the SIGALRM handler, which should work
on both python2 and python3.

This fixes a rare deadlock during parallel builds on python3.

For background:
https://www.python.org/dev/peps/pep-0475/#backward-compatibility

"Applications relying on the fact that system calls are interrupted
with InterruptedError will hang. The authors of this PEP don't think
that such applications exist [...]"

Well, apparently they were mistaken :)
2020-06-15 02:20:02 -04:00
..
version Add a bunch of missing python docstrings. 2018-12-14 09:03:53 +00:00
.gitignore Rename redo/python -> redo/py. 2018-12-05 02:27:04 -05:00
__init__.py Directory reorg: move code into redo/, generate binaries in bin/. 2018-12-04 02:53:40 -05:00
atoi.py Add a bunch of missing python docstrings. 2018-12-14 09:03:53 +00:00
builder.py Distinguish byte (python2 str type) and unicode strings (python 3 str type) 2019-10-30 21:28:49 +01:00
clean.do Remove python interpreter selection 2019-10-30 19:58:12 +01:00
cmd_always.py Workaround for completely broken file locking on Windows 10 WSL. 2019-01-02 14:49:33 -05:00
cmd_ifchange.py Run 2to3 utility 2019-10-30 19:58:12 +01:00
cmd_ifcreate.py Workaround for completely broken file locking on Windows 10 WSL. 2019-01-02 14:49:33 -05:00
cmd_log.py Prevent "Exception ... ignored" in redo-log ... | head 2019-10-30 21:28:49 +01:00
cmd_ood.py Unify print function usage for Python 2 and 3 via __future__ import 2019-10-30 21:28:49 +01:00
cmd_redo.py Unify print function usage for Python 2 and 3 via __future__ import 2019-10-30 21:28:49 +01:00
cmd_sources.py Unify print function usage for Python 2 and 3 via __future__ import 2019-10-30 21:28:49 +01:00
cmd_stamp.py Workaround for completely broken file locking on Windows 10 WSL. 2019-01-02 14:49:33 -05:00
cmd_targets.py Unify print function usage for Python 2 and 3 via __future__ import 2019-10-30 21:28:49 +01:00
cmd_unlocked.py Workaround for completely broken file locking on Windows 10 WSL. 2019-01-02 14:49:33 -05:00
cmd_whichdo.py Run 2to3 utility 2019-10-30 19:58:12 +01:00
cycles.py Move env.{add,get}_lock() into cycles.py, and rename. 2018-12-05 02:26:58 -05:00
deps.py Python 2/3 compatible treatment of max(n, None) 2019-10-30 21:59:01 +01:00
env.py Change -x/-v to only affect top-level targets by default, not recursively. 2019-03-02 18:46:00 -05:00
helpers.py Run 2to3 utility 2019-10-30 19:58:12 +01:00
jobserver.py jobserver.py: _try_read()'s alarm timeout needs to throw an exception. 2020-06-15 02:20:02 -04:00
logs.py redo-log: sometimes print a (resumed) line after ending a level of recursion. 2019-03-02 19:08:47 -05:00
options.py Run 2to3 utility 2019-10-30 19:58:12 +01:00
paths.py If redo searched all the way up to /default.do, it would run ./default.do instead. 2019-03-02 04:05:36 -05:00
py.do Rename redo/python -> redo/py. 2018-12-05 02:27:04 -05:00
sh.do shelltest.od: add more "set -e" tests and add a 'skip' return code. 2018-12-17 16:17:37 +00:00
state.py Prevent iterator being changed while iterating 2019-10-30 21:59:01 +01:00
title.py Add a bunch of missing python docstrings. 2018-12-14 09:03:53 +00:00
whichpython.do Remove python interpreter selection 2019-10-30 19:58:12 +01:00