summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-05-30 17:41:51 +0000
committerDries Buytaert <dries@buytaert.net>2008-05-30 17:41:51 +0000
commitb806c1b03b19cc13241db0517892c60d27c085a1 (patch)
tree20b271f7e1f1ac01dec920a087baa8a56efb6d0a
parentc6c26b5e230b5225ea8a355b6e7a7b31096f7cb3 (diff)
downloadbrdo-b806c1b03b19cc13241db0517892c60d27c085a1.tar.gz
brdo-b806c1b03b19cc13241db0517892c60d27c085a1.tar.bz2
- Patch #259001 by paul.lovvik: drupal_cron_run should ignore a user abort.
-rw-r--r--includes/common.inc9
1 files changed, 5 insertions, 4 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 598849907..bdf3d1867 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -2502,10 +2502,11 @@ function page_set_cache() {
* Returns TRUE if ran successfully
*/
function drupal_cron_run() {
- // If not in 'safe mode', increase the maximum execution time:
- if (!ini_get('safe_mode')) {
- set_time_limit(240);
- }
+ // Allow execution to continue even if the request gets canceled.
+ @ignore_user_abort(TRUE);
+
+ // Increase the maximum execution time.
+ @set_time_limit(240);
// Fetch the cron semaphore
$semaphore = variable_get('cron_semaphore', FALSE);