[issue12187] subprocess.wait() with a timeout uses polling on POSIX

STINNER Victor report at bugs.python.org
Mon Feb 3 02:06:59 CET 2014


STINNER Victor added the comment:

Ok, the new asyncio.subprocess module has been merged.

Use asyncio.create_subprocess_exec/shell to create a subprocess and then use asyncio.wait_for(proc.wait(), timeout) to wait for the exit of the process with a timeout. The wait is asynchronous thanks to asyncio internals.

I close the issue. I consider it fixed with the asyncio option. As I wrote, I don't think that it's possible to fix it in subprocess in a portable way without breaking backward compatibility. asyncio is new and so there is no risk of breaking the backward compatibility.

----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12187>
_______________________________________


More information about the Python-bugs-list mailing list