diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2015-07-31 15:50:29 (GMT) |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2015-07-31 15:50:29 (GMT) |
| commit | 9591bf11d1852d323ca2c1231d129c9083ca6131 (patch) | |
| tree | dcf16173125841ebc6672a79fcb5d4d26f21b8db /Lib/asyncio | |
| parent | daffc916aabb8424b6708039e64054f792fb660d (diff) | |
| parent | a7a4c41411026f5c049bb147425f6ce34c187bb6 (diff) | |
| download | cpython-9591bf11d1852d323ca2c1231d129c9083ca6131.zip cpython-9591bf11d1852d323ca2c1231d129c9083ca6131.tar.gz cpython-9591bf11d1852d323ca2c1231d129c9083ca6131.tar.bz2 | |
Merge 3.5 (asyncio)
Diffstat (limited to 'Lib/asyncio')
| -rw-r--r-- | Lib/asyncio/base_subprocess.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/asyncio/base_subprocess.py b/Lib/asyncio/base_subprocess.py index c1477b8..a6971b1 100644 --- a/Lib/asyncio/base_subprocess.py +++ b/Lib/asyncio/base_subprocess.py @@ -35,8 +35,13 @@ class BaseSubprocessTransport(transports.SubprocessTransport): self._pipes[2] = None # Create the child process: set the _proc attribute - self._start(args=args, shell=shell, stdin=stdin, stdout=stdout, - stderr=stderr, bufsize=bufsize, **kwargs) + try: + self._start(args=args, shell=shell, stdin=stdin, stdout=stdout, + stderr=stderr, bufsize=bufsize, **kwargs) + except: + self.close() + raise + self._pid = self._proc.pid self._extra['subprocess'] = self._proc |
