aboutsummaryrefslogtreecommitdiffstats
path: root/vespamalloc
diff options
context:
space:
mode:
authorarnej27959 <arnej@yahoo-inc.com>2016-07-01 12:48:25 +0200
committerarnej27959 <arnej@yahoo-inc.com>2016-07-01 12:48:25 +0200
commit4fadfbbc27d3fba5c66f02ee894dd8029689ac49 (patch)
treea687680c2cd6a2cf2071d00ea93b9ec2a7630cb5 /vespamalloc
parent7d2a71ac4cbb2e445020aea0b0bdf3b010b9ad51 (diff)
handle sh != bash case better
Diffstat (limited to 'vespamalloc')
-rwxr-xr-xvespamalloc/src/tests/thread/thread_test.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/vespamalloc/src/tests/thread/thread_test.sh b/vespamalloc/src/tests/thread/thread_test.sh
index 7d9a0bedd86..3af29ad052e 100755
--- a/vespamalloc/src/tests/thread/thread_test.sh
+++ b/vespamalloc/src/tests/thread/thread_test.sh
@@ -1,7 +1,17 @@
#!/bin/bash
set -e
-ulimit -u 31215
+echo "Trying to find limit for processes:"
+if ulimit -u; then
+ echo "Fixing limit to 31215"
+ ulimit -u 31215
+elif [ "$RETRYEXEC" ]; then
+ echo "Already tried to re-exec script, giving up."
+ exit 1
+else
+ echo "Command 'ulimit -u' failed, trying to re-exec script with bash instead."
+ exec /usr/bin/env RETRYEXEC=true bash $0
+fi
VESPA_MALLOC_SO=../../../src/vespamalloc/libvespamalloc.so
VESPA_MALLOC_SO_D=../../../src/vespamalloc/libvespamalloc_vespamallocd.so