moodle_request_shutdown(): silence errors when apache_child_terminate() is disallowed - (MDL-9350)

This commit is contained in:
martinlanghoff
2007-04-16 00:24:42 +00:00
parent fb733f80e3
commit 5ad59d2b07
+2 -2
View File
@@ -6495,11 +6495,11 @@ function moodle_request_shutdown() {
// but check just in case
if (function_exists('apache_child_terminate') && function_exists('memory_get_usage')) {
if (empty($CFG->apachemaxmem)) {
$CFG->apachemaxmem = 10000000; // default 10MiB
$CFG->apachemaxmem = 25000000; // default 25MiB
}
if (memory_get_usage() > (int)$CFG->apachemaxmem) {
trigger_error('Mem usage over $CFG->apachemaxmem: marking child for reaping.');
apache_child_terminate();
@apache_child_terminate();
}
}
}