]> granicus.if.org Git - php/commitdiff
@- Fixed signal() bug that could cause the Apache master process to
authorThies C. Arntzen <thies@php.net>
Sat, 5 Feb 2000 19:32:27 +0000 (19:32 +0000)
committerThies C. Arntzen <thies@php.net>
Sat, 5 Feb 2000 19:32:27 +0000 (19:32 +0000)
@  die. (Thies)

the problem was that we *did* register the signal in the apache
master process as well.
php_module_startup() -> REGISTER_INI_ENTRIES() -> OnChangeMaxExecutionTime() -> php_set_timeout().

from now on the .ini mechanism only sets PG(max_execution_time) and that gets
"converted" to a timeout-signal() in php_request_startup()!

we still need to think about the ZTS timeout mechanism.

main/main.c

index 7828c7bd640d9e950d0d3a556b478a8bf09dfa2f..e8706ac29f79071fcc47736db0a004d4846bb636 100644 (file)
@@ -1,5 +1,5 @@
 /* 
-   +----------------------------------------------------------------------+
+   +----------------------------------------------------------------------
    | PHP version 4.0                                                      |
    +----------------------------------------------------------------------+
    | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group                   |
@@ -120,22 +120,6 @@ static PHP_INI_MH(OnSetPrecision)
 }
 
 
-static PHP_INI_MH(OnChangeMaxExecutionTime)
-{
-       int new_timeout;
-       PLS_FETCH();
-       
-       if (new_value) {
-               new_timeout = atoi(new_value);
-       } else {
-               new_timeout = 0;
-       }
-       PG(max_execution_time) = new_timeout;
-       php_set_timeout(new_timeout);
-       return SUCCESS;
-}
-
-
 #if MEMORY_LIMIT
 static PHP_INI_MH(OnChangeMemoryLimit)
 {
@@ -240,7 +224,7 @@ PHP_INI_BEGIN()
 
        PHP_INI_ENTRY_EX("define_syslog_variables",     "0",            PHP_INI_ALL,            NULL,   php_ini_boolean_displayer_cb)
 
-       PHP_INI_ENTRY("max_execution_time",             "30",                   PHP_INI_ALL,            OnChangeMaxExecutionTime)
+       STD_PHP_INI_ENTRY("max_execution_time",         "30",                   PHP_INI_ALL,            OnUpdateInt,                            max_execution_time,     php_core_globals,       core_globals)
 #if MEMORY_LIMIT
        PHP_INI_ENTRY("memory_limit",                   "8388608",              PHP_INI_ALL,            OnChangeMemoryLimit)
 #endif