mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-26 09:58:20 +01:00
timeout games after five minutes no matter what
This commit is contained in:
parent
b15665e041
commit
d29b048504
1 changed files with 6 additions and 0 deletions
|
@ -201,6 +201,7 @@ do_one() {
|
|||
done
|
||||
|
||||
test -n "$VERBOSE" && echo "watching:$PIDS"
|
||||
END_TIME=$(($(date +%s) + 300)) # five minute timeout
|
||||
while [ -d /tmp/$RUN_NAME -a -n "$PIDS" ]; do
|
||||
sleep 10
|
||||
for PID in $PIDS; do
|
||||
|
@ -209,6 +210,11 @@ do_one() {
|
|||
PIDS=""
|
||||
fi
|
||||
done
|
||||
if [ $(date +%s) -ge $END_TIME ]; then
|
||||
echo "killing $PIDS because out of time"
|
||||
kill $PIDS 2>/dev/null
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
check_logs $COOKIE
|
||||
|
|
Loading…
Reference in a new issue