mirror of https://github.com/python/cpython
asyncio: Fix race in subprocess transport, by Victor Stinner.
This commit is contained in:
parent
efef9d3f25
commit
4835f17c24
|
@ -160,9 +160,10 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop):
|
|||
transp = _UnixSubprocessTransport(self, protocol, args, shell,
|
||||
stdin, stdout, stderr, bufsize,
|
||||
extra=None, **kwargs)
|
||||
yield from transp._post_init()
|
||||
watcher.add_child_handler(transp.get_pid(),
|
||||
self._child_watcher_callback, transp)
|
||||
yield from transp._post_init()
|
||||
|
||||
return transp
|
||||
|
||||
def _child_watcher_callback(self, pid, returncode, transp):
|
||||
|
|
Loading…
Reference in New Issue