Merge "wpUndidRevision should be passed along during 'preview' and 'diff'"
[lhc/web/wiklou.git] / includes / limit.sh
index 44b9edc..6c4690e 100644 (file)
@@ -36,6 +36,8 @@ if [ "$MW_MEM_LIMIT" -gt 0 ]; then
        else
                ulimit -v "$MW_MEM_LIMIT"
        fi
+else
+       MW_CGROUP=""
 fi
 if [ "$MW_FILE_SIZE_LIMIT" -gt 0 ]; then
        ulimit -f "$MW_FILE_SIZE_LIMIT"
@@ -53,7 +55,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
@@ -82,7 +84,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