bpo-40094: CGIHTTPRequestHandler logs exit code (GH-19285)
CGIHTTPRequestHandler of http.server now logs the CGI script exit code, rather than the CGI script exit status of os.waitpid(). For example, if the script is killed by signal 11, it now logs: "CGI script exit code -11."
This commit is contained in:
parent
e27916b1fc
commit
9a679a0e47
|
@ -1164,8 +1164,9 @@ class CGIHTTPRequestHandler(SimpleHTTPRequestHandler):
|
|||
while select.select([self.rfile], [], [], 0)[0]:
|
||||
if not self.rfile.read(1):
|
||||
break
|
||||
if sts:
|
||||
self.log_error("CGI script exit status %#x", sts)
|
||||
exitcode = os.waitstatus_to_exitcode(sts)
|
||||
if exitcode:
|
||||
self.log_error(f"CGI script exit code {exitcode}")
|
||||
return
|
||||
# Child
|
||||
try:
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
CGIHTTPRequestHandler of http.server now logs the CGI script exit code,
|
||||
rather than the CGI script exit status of os.waitpid(). For example, if the
|
||||
script is killed by signal 11, it now logs: "CGI script exit code -11."
|
Loading…
Reference in New Issue