From 1616b5193c351ee8d6533e92b330fcee3275ffc2 Mon Sep 17 00:00:00 2001 From: "Thies C. Arntzen" Date: Sat, 5 Feb 2000 19:32:27 +0000 Subject: [PATCH] @- Fixed signal() bug that could cause the Apache master process to @ 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 | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/main/main.c b/main/main.c index 7828c7bd64..e8706ac29f 100644 --- a/main/main.c +++ b/main/main.c @@ -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 -- 2.50.1