From: Dmitry Stogov Date: Fri, 3 Feb 2006 16:31:09 +0000 (+0000) Subject: iFixed several small FastCGI releated bugs X-Git-Tag: php-4.4.3RC1~62 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8fbbbc41b70a37003aa932a8218da893c0418abc;p=php iFixed several small FastCGI releated bugs --- diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index d1a116c67c..5efda508ea 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -281,7 +281,7 @@ static void sapi_cgibin_flush(void *server_context) #ifndef PHP_WIN32 !parent && #endif - (!request || FCGX_FFlush(request->out) == -1)) { + request && FCGX_FFlush(request->out) == -1) { php_handle_aborted_connection(); } return; @@ -1260,7 +1260,8 @@ consult the installation file that came with this distribution, or visit \n\ fprintf( stderr, "Wait for kids, pid %d\n", getpid() ); #endif - wait( &status ); + while (wait( &status ) < 0) { + } running--; } } @@ -1688,6 +1689,7 @@ fastcgi_request_done: exit_status = 255; } zend_end_try(); + SG(server_context) = NULL; php_module_shutdown(TSRMLS_C); #ifdef ZTS