dmitry          Fri Feb 16 11:30:38 2007 UTC

  Modified files:              
    /php-src/sapi/cgi   cgi_main.c 
  Log:
  Fixed bug #40286 (PHP fastcgi with PHP_FCGI_CHILDREN don't kill children when 
parent is killed)
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.309&r2=1.310&diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.309 php-src/sapi/cgi/cgi_main.c:1.310
--- php-src/sapi/cgi/cgi_main.c:1.309   Thu Feb 15 12:33:54 2007
+++ php-src/sapi/cgi/cgi_main.c Fri Feb 16 11:30:38 2007
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: cgi_main.c,v 1.309 2007/02/15 12:33:54 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.310 2007/02/16 11:30:38 dmitry Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -344,15 +344,13 @@
 
 static int sapi_cgi_read_post(char *buffer, uint count_bytes TSRMLS_DC)
 {
-       uint read_bytes=0, tmp_read_bytes;
-       char *pos = buffer;
+       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 (fcgi_is_fastcgi()) {
                        fcgi_request *request = (fcgi_request*) 
SG(server_context);
-                       tmp_read_bytes = fcgi_read(request, pos, count_bytes - 
read_bytes);
-                       pos += tmp_read_bytes;
+                       tmp_read_bytes = fcgi_read(request, buffer + 
read_bytes, count_bytes - read_bytes);
                } else {
                        tmp_read_bytes = read(0, buffer + read_bytes, 
count_bytes - read_bytes);
                }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to