chiark / gitweb /
Use alarm(1) in repeatedly. Call fail if startup fails.
authorijackson <ijackson>
Fri, 4 Jan 2002 21:23:57 +0000 (21:23 +0000)
committerijackson <ijackson>
Fri, 4 Jan 2002 21:23:57 +0000 (21:23 +0000)
bridge.tcl
repeatedly.sh

index 1282aed7e918eda4bb172e622fdae4c067373f33..64d2d5ed66de0ed3daf10740dd958bf0d3d909f0 100755 (executable)
@@ -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"
+}
index db6e3bafe2918b5cccc27b08f80ad46137b18fed..4a44447d2b1c7844c8feb2581ee093577dbdb34a 100755 (executable)
@@ -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