X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=bin%2Fulimit5.sh;h=fd8aae2cd53c5c062ce167c3a4de92aa82a05cc5;hb=2152738bca8ad4010de3f45a884e4dc9dd80bc7b;hp=3f2417210583063632bcfe40fc3b3dcbb45430ec;hpb=c8e3fa04dbd8f0f185cfab138379a73d2a1227b5;p=lhc%2Fweb%2Fwiklou.git diff --git a/bin/ulimit5.sh b/bin/ulimit5.sh index 3f24172105..fd8aae2cd5 100644 --- a/bin/ulimit5.sh +++ b/bin/ulimit5.sh @@ -9,8 +9,8 @@ fi if [ "$3" -gt 0 ]; then ulimit -f "$3" fi -if [ "$4" -gt 0 ]; then - timeout $4 /bin/bash -c "$5" +if [ "$4" -gt 0 -a -x "/usr/bin/timeout" ]; then + /usr/bin/timeout $4 /bin/bash -c "$5" STATUS="$?" if [ "$STATUS" == 124 ]; then echo "ulimit5.sh: timed out." 1>&2