File php-5.1.2-phpbug-36158.patch of Package php
--- sapi/cgi/cgi_main.c 2006/01/01 13:09:57 1.274
+++ sapi/cgi/cgi_main.c 2006/02/03 16:30:27 1.275
@@ -269,7 +269,7 @@
#ifndef PHP_WIN32
!parent &&
#endif
- (!request || FCGX_FFlush(request->out) == -1)) {
+ request && FCGX_FFlush(request->out) == -1) {
php_handle_aborted_connection();
}
return;
@@ -1200,7 +1200,8 @@
#ifdef DEBUG_FASTCGI
fprintf(stderr, "Wait for kids, pid %d\n", getpid());
#endif
- wait(&status);
+ while (wait(&status) < 0) {
+ }
running--;
}
}
@@ -1589,6 +1590,7 @@
exit_status = 255;
} zend_end_try();
+ SG(server_context) = NULL;
php_module_shutdown(TSRMLS_C);
sapi_shutdown();