dmitry          Mon Jan 29 19:38:21 2007 UTC

  Modified files:              
    /php-src/sapi/cgi   cgi_main.c 
  Log:
  Prevent flush() of closed handle on php_module_shutdown()
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.307&r2=1.308&diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.307 php-src/sapi/cgi/cgi_main.c:1.308
--- php-src/sapi/cgi/cgi_main.c:1.307   Mon Jan  1 09:29:36 2007
+++ php-src/sapi/cgi/cgi_main.c Mon Jan 29 19:38:21 2007
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: cgi_main.c,v 1.307 2007/01/01 09:29:36 sebastian Exp $ */
+/* $Id: cgi_main.c,v 1.308 2007/01/29 19:38:21 dmitry Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -1451,6 +1451,7 @@
 
                                                case 'i': /* php info & quit */
                                                        if 
(php_request_startup(TSRMLS_C) == FAILURE) {
+                                                               
SG(server_context) = NULL;
                                                                
php_module_shutdown(TSRMLS_C);
                                                                return FAILURE;
                                                        }
@@ -1497,6 +1498,7 @@
                                                case 'v': /* show php version & 
quit */
                                                        no_headers = 1;
                                                        if 
(php_request_startup(TSRMLS_C) == FAILURE) {
+                                                               
SG(server_context) = NULL;
                                                                
php_module_shutdown(TSRMLS_C);
                                                                return FAILURE;
                                                        }
@@ -1597,6 +1599,7 @@
                                if (fastcgi) {
                                        fcgi_finish_request(&request);
                                }
+                               SG(server_context) = NULL;
                                php_module_shutdown(TSRMLS_C);
                                return FAILURE;
                        }
@@ -1627,6 +1630,7 @@
                                        goto fastcgi_request_done;
                                }
                                php_request_shutdown((void *) 0);
+                               SG(server_context) = NULL;
                                php_module_shutdown(TSRMLS_C);
                                return FAILURE;
                        }

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

Reply via email to