[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS
Eryk Sun
report at bugs.python.org
Thu Aug 22 23:04:25 EDT 2019
Eryk Sun <eryksun at gmail.com> added the comment:
> Is there a way to workaround that?
For Windows, subprocess could have a _read_all(file) method that special cases a pipe. The read loop for a pipe would check whether the child has exited. Then call _winapi.PeekNamedPipe on the handle (from get_osfhandle), and do a raw read of the available bytes. If the child has exited or PeekNamedPipe fails (EPIPE), then break, join the partial reads, decode and translate newlines if it's text mode, and return.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37531>
_______________________________________
More information about the Python-bugs-list
mailing list