From 5c843330f8cb13ed0c6197b6b9361a6753f9e9b4 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 25 Jan 2013 13:24:17 -0800 Subject: [PATCH] (bug 44044) Check for existence of the timeout script in ulimit5.sh Change-Id: I89d5dd6535a6b37cadcafd12affaad1a82af22ba --- bin/ulimit5.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.20.1