[PHP-CVS] cvs: php-src(PHP_4_4) / NEWS /sapi/cgi cgi_main.c

2007-02-16 Thread Dmitry Stogov
dmitry  Fri Feb 16 11:47:20 2007 UTC

  Modified files:  (Branch: PHP_4_4)
/php-srcNEWS 
/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/NEWS?r1=1.1247.2.920.2.194r2=1.1247.2.920.2.195diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.920.2.194 php-src/NEWS:1.1247.2.920.2.195
--- php-src/NEWS:1.1247.2.920.2.194 Fri Feb 16 08:21:30 2007
+++ php-src/NEWSFri Feb 16 11:47:19 2007
@@ -4,6 +4,8 @@
 - 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)
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.190.2.68.2.7r2=1.190.2.68.2.8diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.190.2.68.2.7 
php-src/sapi/cgi/cgi_main.c:1.190.2.68.2.8
--- php-src/sapi/cgi/cgi_main.c:1.190.2.68.2.7  Mon Jan  1 09:46:51 2007
+++ php-src/sapi/cgi/cgi_main.c Fri Feb 16 11:47:20 2007
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.190.2.68.2.7 2007/01/01 09:46:51 sebastian Exp $ */
+/* $Id: cgi_main.c,v 1.190.2.68.2.8 2007/02/16 11:47:20 dmitry Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -351,18 +351,14 @@
 
 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);
}

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



[PHP-CVS] cvs: php-src(PHP_4_4) / NEWS /sapi/cgi cgi_main.c /sapi/cli php_cli.c

2005-10-06 Thread Johannes Schl
johannesThu Oct  6 16:39:29 2005 EDT

  Modified files:  (Branch: PHP_4_4)
/php-srcNEWS 
/php-src/sapi/cgi   cgi_main.c 
/php-src/sapi/cli   php_cli.c 
  Log:
  - MFH: Fix #34557 php -m exits with error 1
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.920.2.47r2=1.1247.2.920.2.48ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.920.2.47 php-src/NEWS:1.1247.2.920.2.48
--- php-src/NEWS:1.1247.2.920.2.47  Wed Oct  5 10:34:38 2005
+++ php-src/NEWSThu Oct  6 16:39:24 2005
@@ -13,6 +13,7 @@
 - Fixed bug #34645 (ctype corrupts memory when validating large numbers). 
(Ilia)
 - Fixed bug #34565 (mb_send_mail does not fetch mail.force_extra_parameters).
   (Marco, Ilia)
+- Fixed bug #34557 (php -m exits with error 1). (Johannes)
 - Fixed bug #34456 (Possible crash inside pspell extension). (Nuno)
 - Fixed bug #34311 (unserialize() crashes with chars above 191 dec). (Nuno)
 - Fixed bug #34307 (on_modify handler not called to set the default value if
http://cvs.php.net/diff.php/php-src/sapi/cgi/cgi_main.c?r1=1.190.2.68r2=1.190.2.68.2.1ty=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.190.2.68 
php-src/sapi/cgi/cgi_main.c:1.190.2.68.2.1
--- php-src/sapi/cgi/cgi_main.c:1.190.2.68  Thu Apr 28 10:24:47 2005
+++ php-src/sapi/cgi/cgi_main.c Thu Oct  6 16:39:26 2005
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.190.2.68 2005/04/28 14:24:47 sniper Exp $ */
+/* $Id: cgi_main.c,v 1.190.2.68.2.1 2005/10/06 20:39:26 johannes Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -1395,7 +1395,7 @@
}
php_print_info(0x 
TSRMLS_CC);
php_end_ob_buffers(1 TSRMLS_CC);
-   exit(1);
+   exit(0);
break;
 
case 'l': /* syntax check mode */
@@ -1413,7 +1413,7 @@
print_extensions(TSRMLS_C);
php_printf(\n);
php_end_ob_buffers(1 TSRMLS_CC);
-   exit(1);
+   exit(0);
break;
 
 #if 0 /* not yet operational, see also below ... */
@@ -1446,7 +1446,7 @@
php_printf(PHP %s (%s) (built: 
%s %s)\nCopyright (c) 1997-2004 The PHP Group\n%s, PHP_VERSION, 
sapi_module.name, __DATE__, __TIME__, get_zend_version());
 #endif
php_end_ob_buffers(1 TSRMLS_CC);
-   exit(1);
+   exit(0);
break;
 
case 'w': 
http://cvs.php.net/diff.php/php-src/sapi/cli/php_cli.c?r1=1.51.2.37r2=1.51.2.37.2.1ty=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.51.2.37 
php-src/sapi/cli/php_cli.c:1.51.2.37.2.1
--- php-src/sapi/cli/php_cli.c:1.51.2.37Tue Mar 22 10:09:36 2005
+++ php-src/sapi/cli/php_cli.c  Thu Oct  6 16:39:26 2005
@@ -623,8 +623,9 @@
php_output_activate(TSRMLS_C);
php_cli_usage(argv[0]);
php_end_ob_buffers(1 TSRMLS_CC);
-   exit_status=1;
-   goto err;
+   exit_status=0;
+   zend_ini_deactivate(TSRMLS_C);
+   goto out_err;
 
 
case 'i': /* php info  quit */
@@ -633,7 +634,7 @@
}
php_print_info(0x TSRMLS_CC);
php_end_ob_buffers(1 TSRMLS_CC);
-   exit_status=1;
+   exit_status=0;
goto out;
 
case 'm': /* list compiled in modules */
@@ -645,8 +646,9 @@
print_extensions(TSRMLS_C);
php_printf(\n);
php_end_ob_buffers(1 TSRMLS_CC);
-   exit_status=1;
-   goto err;
+   exit_status=0;
+   zend_ini_deactivate(TSRMLS_C);
+   goto out_err;
 
case 'v': /* show php version  quit */
if (php_request_startup(TSRMLS_C)==FAILURE) {
@@ -658,7 +660,7 @@
php_printf(PHP %s (%s) (built: %s