dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bfe28c1
)
Fix error message when swap is disabled
author
Tim Starling
<tstarling@wikimedia.org>
Mon, 19 May 2014 00:41:52 +0000
(10:41 +1000)
committer
Tim Starling
<tstarling@wikimedia.org>
Mon, 19 May 2014 00:41:52 +0000
(10:41 +1000)
Bug: 65465
Change-Id: Ibb1b14f5271d60c039398e8ce8a9c2a5d245241f
includes/limit.sh
patch
|
blob
|
history
diff --git
a/includes/limit.sh
b/includes/limit.sh
index
82197b5
..
d71e660
100644
(file)
--- a/
includes/limit.sh
+++ b/
includes/limit.sh
@@
-76,7
+76,10
@@
if [ "$MW_MEM_LIMIT" -gt 0 ]; then
# Memory
echo $(($MW_MEM_LIMIT*1024)) > "$MW_CGROUP"/$$/memory.limit_in_bytes
# Memory+swap
- echo $(($MW_MEM_LIMIT*1024)) > "$MW_CGROUP"/$$/memory.memsw.limit_in_bytes
+ # This will be missing if there is no swap
+ if [ -e "$MW_CGROUP"/$$/memory.memsw.limit_in_bytes ]; then
+ echo $(($MW_MEM_LIMIT*1024)) > "$MW_CGROUP"/$$/memory.memsw.limit_in_bytes
+ fi
else
ulimit -v "$MW_MEM_LIMIT"
fi