summaryrefslogtreecommitdiffstats
path: root/Lib/http
diff options
context:
space:
mode:
authorBrian Curtin <brian.curtin@gmail.com>2010-11-05 15:04:48 (GMT)
committerBrian Curtin <brian.curtin@gmail.com>2010-11-05 15:04:48 (GMT)
commitcbad4df179456a7e4116d29358445e352c3a3d56 (patch)
tree3363e86f63ef30b4f205736e3bf1a54833ad83e5 /Lib/http
parent69cd87b5fa284a6ec386d42aa3bcf8e0174ca35b (diff)
downloadcpython-cbad4df179456a7e4116d29358445e352c3a3d56.zip
cpython-cbad4df179456a7e4116d29358445e352c3a3d56.tar.gz
cpython-cbad4df179456a7e4116d29358445e352c3a3d56.tar.bz2
Close subprocess pipes in the non-UNIX section of run_cgi.
Clears a number of ResourceWarnings in test_httpservers.
Diffstat (limited to 'Lib/http')
-rw-r--r--Lib/http/server.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/http/server.py b/Lib/http/server.py
index f6d0db4..8a6ba70 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)