diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-12-08 09:55:49 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-12-08 09:55:49 +0100 |
commit | 4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch) | |
tree | af68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /includes/limit.sh | |
parent | af4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff) |
Update to MediaWiki 1.22.0
Diffstat (limited to 'includes/limit.sh')
-rw-r--r-- | includes/limit.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/includes/limit.sh b/includes/limit.sh index bc1988de..2a1545b6 100644 --- a/includes/limit.sh +++ b/includes/limit.sh @@ -6,6 +6,7 @@ # and is available on most Linux systems. If Perl was distributed with # BSD::Resource included, we would happily use that instead, but it isn't. +MW_INCLUDE_STDERR= MW_CPU_LIMIT=0 MW_CGROUP= MW_MEM_LIMIT=0 @@ -15,6 +16,10 @@ MW_WALL_CLOCK_LIMIT=0 # Override settings eval "$2" +if [ -n "$MW_INCLUDE_STDERR" ]; then + exec 2>&1 +fi + if [ "$MW_CPU_LIMIT" -gt 0 ]; then ulimit -t "$MW_CPU_LIMIT" fi @@ -55,7 +60,7 @@ fi # Clean up cgroup cleanup() { - # First we have to move the current task into a "garbage" group, otherwise + # First we have to move the current task into a "garbage" group, otherwise # the cgroup will not be empty, and attempting to remove it will fail with # "Device or resource busy" if [ -w "$MW_CGROUP"/tasks ]; then @@ -84,7 +89,7 @@ if [ -n "$MW_CGROUP" ]; then updateTaskCount if [ $NUM_TASKS -gt 1 ]; then - # Spawn a monitor process which will continue to poll for completion + # Spawn a monitor process which will continue to poll for completion # of all processes in the cgroup after termination of the parent shell ( while [ $NUM_TASKS -gt 1 ]; do |