chiark
/
gitweb
/
~mdw
/
ircbot
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Use alarm(1) in repeatedly. Call fail if startup fails.
[ircbot]
/
repeatedly.sh
diff --git
a/repeatedly.sh
b/repeatedly.sh
index db6e3bafe2918b5cccc27b08f80ad46137b18fed..4a44447d2b1c7844c8feb2581ee093577dbdb34a 100755
(executable)
--- a/
repeatedly.sh
+++ b/
repeatedly.sh
@@
-4,7
+4,11
@@
cd "`dirname $0`"
while true; do
date
- HOME=. tclsh8.2 || true
+ set +e
+ HOME=. alarm 50000 tclsh8.2
+ rc=$?
+ set -e
date
- sleep 600
+ test $rc = 142 || sleep 590
+ sleep 10
done