make sure we return an errorcode when the ctdb command has hung and is timeodout...
authorroot <root@test1n1.VSOFS1.COM>
Wed, 10 Dec 2008 00:49:51 +0000 (11:49 +1100)
committerroot <root@test1n1.VSOFS1.COM>
Wed, 10 Dec 2008 00:49:51 +0000 (11:49 +1100)
tools/ctdb.c

index bb663a6767850ee6af0ce860bdd8ac9f64271a33..1f0c331257304f9cf281d80117545bb32ba7d2df 100644 (file)
@@ -31,6 +31,8 @@
 #include "../common/rb_tree.h"
 #include "db_wrap.h"
 
+#define ERR_TIMEOUT    20
+
 static void usage(void);
 
 static struct {
@@ -2644,7 +2646,7 @@ static void usage(void)
 static void ctdb_alarm(int sig)
 {
        printf("Maximum runtime exceeded - exiting\n");
-       _exit(0);
+       _exit(ERR_TIMEOUT);
 }
 
 /*