From: Dmitry Stogov Date: Mon, 29 Jan 2007 19:38:21 +0000 (+0000) Subject: Prevent flush() of closed handle on php_module_shutdown() X-Git-Tag: RELEASE_1_0_0RC1~69 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=68885b28dc64f7b111c22548e600956fbb62ddea;p=php Prevent flush() of closed handle on php_module_shutdown() --- diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 7b350810a6..e3b10b6710 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -1451,6 +1451,7 @@ consult the installation file that came with this distribution, or visit \n\ case 'i': /* php info & quit */ if (php_request_startup(TSRMLS_C) == FAILURE) { + SG(server_context) = NULL; php_module_shutdown(TSRMLS_C); return FAILURE; } @@ -1497,6 +1498,7 @@ consult the installation file that came with this distribution, or visit \n\ case 'v': /* show php version & quit */ no_headers = 1; if (php_request_startup(TSRMLS_C) == FAILURE) { + SG(server_context) = NULL; php_module_shutdown(TSRMLS_C); return FAILURE; } @@ -1597,6 +1599,7 @@ consult the installation file that came with this distribution, or visit \n\ if (fastcgi) { fcgi_finish_request(&request); } + SG(server_context) = NULL; php_module_shutdown(TSRMLS_C); return FAILURE; } @@ -1627,6 +1630,7 @@ consult the installation file that came with this distribution, or visit \n\ goto fastcgi_request_done; } php_request_shutdown((void *) 0); + SG(server_context) = NULL; php_module_shutdown(TSRMLS_C); return FAILURE; }