summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/unix_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-01-15 13:25:08 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-01-15 13:25:08 (GMT)
commit9fef5244ebbfddf18889d2b9669f50e2ee3fc449 (patch)
treed3854a28ee4ad0bebc5ea4384513ce2aea1523e2 /Lib/asyncio/unix_events.py
parentd021c1d3953f95745e30ec4148f324a8d28a29d0 (diff)
parentab8848bc2a64930e0e9a2e56592bb692fb31d9e9 (diff)
downloadcpython-9fef5244ebbfddf18889d2b9669f50e2ee3fc449.zip
cpython-9fef5244ebbfddf18889d2b9669f50e2ee3fc449.tar.gz
cpython-9fef5244ebbfddf18889d2b9669f50e2ee3fc449.tar.bz2
Merge 3.4 (asyncio)
Diffstat (limited to 'Lib/asyncio/unix_events.py')
-rw-r--r--Lib/asyncio/unix_events.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
index 9f4005c..97f9add 100644
--- a/Lib/asyncio/unix_events.py
+++ b/Lib/asyncio/unix_events.py
@@ -177,7 +177,11 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop):
transp = _UnixSubprocessTransport(self, protocol, args, shell,
stdin, stdout, stderr, bufsize,
extra=extra, **kwargs)
- yield from transp._post_init()
+ try:
+ yield from transp._post_init()
+ except:
+ transp.close()
+ raise
watcher.add_child_handler(transp.get_pid(),
self._child_watcher_callback, transp)