thetaphi Fri Mar 20 15:53:34 2009 UTC
Modified files:
/php-src/sapi/nsapi nsapi.c
Log:
Fix a sigsegv on server shutdown, add missing sapi_shutdown().
!!! This should also be merged into 5.3, I prepared it, please tell me if it
is ok to commit !!!
http://cvs.php.net/viewvc.cgi/php-src/sapi/nsapi/nsapi.c?r1=1.103&r2=1.104&diff_format=u
Index: php-src/sapi/nsapi/nsapi.c
diff -u php-src/sapi/nsapi/nsapi.c:1.103 php-src/sapi/nsapi/nsapi.c:1.104
--- php-src/sapi/nsapi/nsapi.c:1.103 Sun Jan 11 13:46:45 2009
+++ php-src/sapi/nsapi/nsapi.c Fri Mar 20 15:53:34 2009
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: nsapi.c,v 1.103 2009/01/11 13:46:45 thetaphi Exp $ */
+/* $Id: nsapi.c,v 1.104 2009/03/20 15:53:34 thetaphi Exp $ */
/*
* PHP includes
@@ -307,7 +307,7 @@
PHP_MINFO_FUNCTION(nsapi)
{
php_info_print_table_start();
- php_info_print_table_row(2, "NSAPI Module Revision", "$Revision: 1.103
$");
+ php_info_print_table_row(2, "NSAPI Module Revision", "$Revision: 1.104
$");
php_info_print_table_row(2, "Server Software", system_version());
php_info_print_table_row(2, "Sub-requests with nsapi_virtual()",
(nsapi_servact_service)?((zend_ini_long("zlib.output_compression",
sizeof("zlib.output_compression"), 0))?"not supported with
zlib.output_compression":"enabled"):"not supported on this platform" );
@@ -466,6 +466,11 @@
{
nsapi_request_context *rc = (nsapi_request_context *)server_context;
TSRMLS_FETCH();
+
+ if (!rc) {
+ /* we have no context, so no flushing needed. This fixes a
SIGSEGV on shutdown */
+ return;
+ }
if (!SG(headers_sent)) {
sapi_send_headers(TSRMLS_C);
@@ -878,6 +883,7 @@
}
#endif
+ sapi_shutdown();
tsrm_shutdown();
log_error(LOG_INFORM, "php6_close", NULL, NULL, "Shutdown PHP Module");
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php