diff options
| author | Georg Brandl <georg@python.org> | 2006-06-04 22:15:37 (GMT) | 
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2006-06-04 22:15:37 (GMT) | 
| commit | ad62489e4706ec4ad6cf24a067969e8d64612fcb (patch) | |
| tree | c3c55cec5a9d63fbb278c0ddbedfbcab43c364fe /Lib/subprocess.py | |
| parent | ddbaa660d3b64a71b4ac9eab64b1bb944ca1276b (diff) | |
| download | cpython-ad62489e4706ec4ad6cf24a067969e8d64612fcb.zip cpython-ad62489e4706ec4ad6cf24a067969e8d64612fcb.tar.gz cpython-ad62489e4706ec4ad6cf24a067969e8d64612fcb.tar.bz2  | |
Bug #1500293: fix memory leaks in _subprocess module.
Diffstat (limited to 'Lib/subprocess.py')
| -rw-r--r-- | Lib/subprocess.py | 10 | 
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py index 87508cc..a281cd8 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -388,6 +388,7 @@ if mswindows:              hStdInput = None              hStdOutput = None              hStdError = None +            wShowWindow = 0          class pywintypes:              error = IOError  else: @@ -744,18 +745,17 @@ class Popen(object):                  args = list2cmdline(args)              # Process startup details -            default_startupinfo = STARTUPINFO()              if startupinfo is None: -                startupinfo = default_startupinfo -            if not None in (p2cread, c2pwrite, errwrite): +                startupinfo = STARTUPINFO() +            if None not in (p2cread, c2pwrite, errwrite):                  startupinfo.dwFlags |= STARTF_USESTDHANDLES                  startupinfo.hStdInput = p2cread                  startupinfo.hStdOutput = c2pwrite                  startupinfo.hStdError = errwrite              if shell: -                default_startupinfo.dwFlags |= STARTF_USESHOWWINDOW -                default_startupinfo.wShowWindow = SW_HIDE +                startupinfo.dwFlags |= STARTF_USESHOWWINDOW +                startupinfo.wShowWindow = SW_HIDE                  comspec = os.environ.get("COMSPEC", "cmd.exe")                  args = comspec + " /c " + args                  if (GetVersion() >= 0x80000000L or  | 
