diff -r 3006f1e6a276 Lib/asyncio/base_subprocess.py --- a/Lib/asyncio/base_subprocess.py Thu Jul 30 21:16:29 2015 -0400 +++ b/Lib/asyncio/base_subprocess.py Fri Jul 31 16:53:24 2015 +0200 @@ -35,8 +35,13 @@ 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