Message352730
It seems like the new regrtest design doesn't work as I expected.
Calling popen.kill() + popen.stdout.close() + popen.stderr.close() from a thread B does not always interrupt popen.communicate() in thread A.
See https://bugs.python.org/issue38207#msg352729 for an example on Linux where communicate() still blocks until all child processes complete.
I see different options:
* Revert changes to restore regrtest old design which didn't have these new issues
* Find a way to fix bpo-38207 on all platforms: be able to interrupt communicate() as soon as the process is killed and/or when all pipes are closed.
* Call communicate() with shorter timeout to workaround the blocking communicate() issue (bpo-38207).
* Maybe experiment asyncio which supports asynchronous subprocess.
asyncio subprocess uses overlapped operations which can be cancelled. So maybe it isn't affected by bpo-38207. |
|
| Date |
User |
Action |
Args |
| 2019-09-18 14:26:01 | vstinner | set | recipients:
+ vstinner, jkloth, jeremy.kloth, eryksun, nanjekyejoannah |
| 2019-09-18 14:26:01 | vstinner | set | messageid: <[email protected]> |
| 2019-09-18 14:26:01 | vstinner | link | issue37531 messages |
| 2019-09-18 14:26:01 | vstinner | create | |
|