From e9e11251b788a70a3d30ffc9e1273f5a4b66c4b3 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 7 Jan 2013 15:19:20 -0800 Subject: [PATCH] Enforce time limit within AssembleUploadChunks.php. Change-Id: I8cfcb09da8e7e9020e6b5dfbc5e727522d01b7c1 --- includes/api/ApiUpload.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index 377bfbfe76..cfa1683173 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -226,7 +226,9 @@ class ApiUpload extends ApiBase { '--quiet' ) ) . " < " . wfGetNull() . " > " . wfGetNull() . " 2>&1 &"; - wfShellExec( $cmd, $retVal ); // start a process in the background + // Start a process in the background. Enforce the time limits via PHP + // since ulimit4.sh seems to often not work for this particular usage. + wfShellExec( $cmd, $retVal, array(), array( 'time' => 0, 'memory' => 0 ) ); if ( $retVal == 0 ) { $result['result'] = 'Poll'; } else { -- 2.20.1