Rev 79: added daemon mode to ctdb_bench in
http://samba.org/~tridge/ctdb
tridge at samba.org
tridge at samba.org
Tue Apr 10 04:46:33 GMT 2007
------------------------------------------------------------
revno: 79
revision-id: tridge at samba.org-20070410044632-78db5388490c3d40
parent: tridge at samba.org-20070410030647-42fc31cb19982f18
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Tue 2007-04-10 14:46:32 +1000
message:
added daemon mode to ctdb_bench
modified:
tests/ctdb_bench.c ctdb_bench.c-20061219052637-2liagoglohxb6p7s-1
=== modified file 'tests/ctdb_bench.c'
--- a/tests/ctdb_bench.c 2007-04-07 00:01:09 +0000
+++ b/tests/ctdb_bench.c 2007-04-10 04:46:32 +0000
@@ -200,6 +200,7 @@
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 @@
{ "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 @@
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) {
More information about the samba-cvs
mailing list