Commit 3170af09 by Eric Coissac

Returns a status equal to 1 if the timeout is exceeded

parent 27df7f1e
...@@ -35,9 +35,9 @@ function timeoutcmd() { ...@@ -35,9 +35,9 @@ function timeoutcmd() {
kill -9 $sleeppid kill -9 $sleeppid
else else
if (( $(ps $mainpid | tail -n +2 | wc -l) > 0 )) ; then if (( $(ps $mainpid | tail -n +2 | wc -l) > 0 )) ; then
echo killed
kill -9 $mainpid kill -9 $mainpid
# logwarning "Timeout after ${seconde}s on command : $*" logwarning "Timeout after ${seconde}s on command : $*"
return 1
fi fi
fi fi
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment