From: Brian Curtin Date: Fri, 5 Nov 2010 15:04:48 +0000 (+0000) Subject: Close subprocess pipes in the non-UNIX section of run_cgi. X-Git-Tag: v3.2a4~138 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cbad4df179456a7e4116d29358445e352c3a3d56;p=thirdparty%2FPython%2Fcpython.git Close subprocess pipes in the non-UNIX section of run_cgi. Clears a number of ResourceWarnings in test_httpservers. --- diff --git a/Lib/http/server.py b/Lib/http/server.py index f6d0db4785d0..8a6ba70a8ab3 100644 --- a/Lib/http/server.py +++ b/Lib/http/server.py @@ -1131,6 +1131,8 @@ class CGIHTTPRequestHandler(SimpleHTTPRequestHandler): self.wfile.write(stdout) if stderr: self.log_error('%s', stderr) + p.stderr.close() + p.stdout.close() status = p.returncode if status: self.log_error("CGI script exit status %#x", status)