diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 3e70e45523e..67559d6895a 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -1834,6 +1834,10 @@ fastcgi_request_done: if (bindpath) { free(bindpath); } + if (max_requests != 1) { + /* no need to return exit_status of the last request */ + exit_status = 0; + } break; } /* end of fastcgi loop */