From 8fbbbc41b70a37003aa932a8218da893c0418abc Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 3 Feb 2006 16:31:09 +0000 Subject: [PATCH] iFixed several small FastCGI releated bugs --- sapi/cgi/cgi_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.50.1