]> granicus.if.org Git - php/commitdiff
Fixed bug #40286 (PHP fastcgi with PHP_FCGI_CHILDREN don't kill children when parent...
authorDmitry Stogov <dmitry@php.net>
Fri, 16 Feb 2007 11:47:20 +0000 (11:47 +0000)
committerDmitry Stogov <dmitry@php.net>
Fri, 16 Feb 2007 11:47:20 +0000 (11:47 +0000)
NEWS
sapi/cgi/cgi_main.c

diff --git a/NEWS b/NEWS
index 86333abceca60ce6b6252723fc08e112a74cf240..a25c4c557461928ea49f91b078f40ab2bc02659c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@ PHP 4                                                                      NEWS
 - Updated PCRE to version 7.0. (Nuno)
 - Fixed segfault in ext/session when register_globals=On. (Tony)
 - Fixed bug #40502 (ext/interbase compile failure). (Tony)
+- Fixed bug #40286 (PHP fastcgi with PHP_FCGI_CHILDREN don't kill children when
+  parent is killed). (Dmitry)
        
 14 Feb 2007, Version 4.4.5
 - Upgraded PEAR to 1.5.0. (Greg)
index c14b38904667b3663db309a46f94e7ac28fe691f..25a656db2c987fe7de5449283e1cefe49f0c8095 100644 (file)
@@ -351,18 +351,14 @@ static int sapi_cgi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
 
 static int sapi_cgi_read_post(char *buffer, uint count_bytes TSRMLS_DC)
 {
-       uint read_bytes=0, tmp_read_bytes;
-#if PHP_FASTCGI
-       char *pos = buffer;
-#endif
+       int read_bytes=0, tmp_read_bytes;
 
        count_bytes = MIN(count_bytes, (uint)SG(request_info).content_length-SG(read_post_bytes));
        while (read_bytes < count_bytes) {
 #if PHP_FASTCGI
                if (!FCGX_IsCGI()) {
                        FCGX_Request *request = (FCGX_Request *)SG(server_context);
-                       tmp_read_bytes = FCGX_GetStr( pos, count_bytes-read_bytes, request->in );
-                       pos += tmp_read_bytes;
+                       tmp_read_bytes = FCGX_GetStr(buffer+read_bytes, count_bytes-read_bytes, request->in );
                } else {
                        tmp_read_bytes = read(0, buffer+read_bytes, count_bytes-read_bytes);
                }