From 4f0ea10fb352c276c42b1268db633a5da6a9ed59 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Apr 2007 14:46:32 +1000 Subject: [PATCH] added daemon mode to ctdb_bench (This used to be ctdb commit b1e71018866752d32f59170fd5c8ba01b05694d9) --- ctdb/tests/ctdb_bench.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ctdb/tests/ctdb_bench.c b/ctdb/tests/ctdb_bench.c index 023c76e7f90..368353877e3 100644 --- a/ctdb/tests/ctdb_bench.c +++ b/ctdb/tests/ctdb_bench.c @@ -200,6 +200,7 @@ int main(int argc, const char *argv[]) const char *transport = "tcp"; const char *myaddress = NULL; int self_connect=0; + int daemon_mode=0; struct poptOption popt_options[] = { POPT_AUTOHELP @@ -207,6 +208,7 @@ int main(int argc, const char *argv[]) { "listen", 0, POPT_ARG_STRING, &myaddress, 0, "address to listen on", "address" }, { "transport", 0, POPT_ARG_STRING, &transport, 0, "protocol transport", NULL }, { "self-connect", 0, POPT_ARG_NONE, &self_connect, 0, "enable self connect", "boolean" }, + { "daemon", 0, POPT_ARG_NONE, &daemon_mode, 0, "spawn a ctdb daemon", "boolean" }, { "timelimit", 't', POPT_ARG_INT, &timelimit, 0, "timelimit", "integer" }, { "num-records", 'r', POPT_ARG_INT, &num_records, 0, "num_records", "integer" }, { "num-msgs", 'n', POPT_ARG_INT, &num_msgs, 0, "num_msgs", "integer" }, @@ -254,6 +256,9 @@ int main(int argc, const char *argv[]) if (self_connect) { ctdb_set_flags(ctdb, CTDB_FLAG_SELF_CONNECT); } + if (daemon_mode) { + ctdb_set_flags(ctdb, CTDB_FLAG_DAEMON_MODE); + } ret = ctdb_set_transport(ctdb, transport); if (ret == -1) {