chiark
/
gitweb
/
~ijackson
/
ircbot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd424c5
)
Use alarm(1) in repeatedly. Call fail if startup fails.
author
ijackson
<ijackson>
Fri, 4 Jan 2002 21:23:57 +0000
(21:23 +0000)
committer
ijackson
<ijackson>
Fri, 4 Jan 2002 21:23:57 +0000
(21:23 +0000)
bridge.tcl
patch
|
blob
|
history
repeatedly.sh
patch
|
blob
|
history
diff --git
a/bridge.tcl
b/bridge.tcl
index 1282aed7e918eda4bb172e622fdae4c067373f33..64d2d5ed66de0ed3daf10740dd958bf0d3d909f0 100755
(executable)
--- a/
bridge.tcl
+++ b/
bridge.tcl
@@
-152,6
+152,10
@@
def_ucmd who {
return [list $o]
}
-loadhelp
-ensure_connecting
-foreach botid $bots { bnbot_ensure_connecting $botid }
+if {[catch {
+ loadhelp
+ ensure_connecting
+ foreach botid $bots { bnbot_ensure_connecting $botid }
+} emsg]} {
+ fail "startup: $emsg"
+}
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