joosters Fri Mar 7 09:48:28 2003 EDT
Modified files:
/php4/sapi/cgi cgi_main.c
Log:
Fix bug whereby a webserver closing stdout from the CGI/FastCGI binary
would cause PHP to get caught in an infinite loop of failing write()
syscalls.
Index: php4/sapi/cgi/cgi_main.c
diff -u php4/sapi/cgi/cgi_main.c:1.214 php4/sapi/cgi/cgi_main.c:1.215
--- php4/sapi/cgi/cgi_main.c:1.214 Mon Feb 17 08:29:59 2003
+++ php4/sapi/cgi/cgi_main.c Fri Mar 7 09:48:28 2003
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cgi_main.c,v 1.214 2003/02/17 13:29:59 zeev Exp $ */
+/* $Id: cgi_main.c,v 1.215 2003/03/07 14:48:28 joosters Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -254,6 +254,7 @@
ret = sapi_cgibin_single_write(ptr, remaining TSRMLS_CC);
if (!ret) {
php_handle_aborted_connection();
+ return str_length - remaining;
}
ptr += ret;
remaining -= ret;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php