summaryrefslogtreecommitdiff
path: root/ctdb/server/ctdb_eventd.c
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2017-08-28 18:39:40 +1000
committerAmitay Isaacs <amitay@samba.org>2017-08-29 11:14:09 +0200
commitb67cc00c9335d899402d28f229d2b4416dc8a674 (patch)
tree6ef1ed85c5db9f63bf4813b3e15891876829f71a /ctdb/server/ctdb_eventd.c
parentfc6fdde60fadf88be3ef9a116feff70fe97a052e (diff)
downloadsamba-b67cc00c9335d899402d28f229d2b4416dc8a674.tar.gz
ctdb-common: Move PID file creation to sock_daemon_run_send()
Only create PID file when actually starting the daemon, rather than when setting up the context. This will facilitate future changes. Tweak test to confirm that PID file is no longer created during setup. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/server/ctdb_eventd.c')
-rw-r--r--ctdb/server/ctdb_eventd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ctdb/server/ctdb_eventd.c b/ctdb/server/ctdb_eventd.c
index a6ab2197e74..cc9256ad7b8 100644
--- a/ctdb/server/ctdb_eventd.c
+++ b/ctdb/server/ctdb_eventd.c
@@ -1197,7 +1197,7 @@ int main(int argc, const char **argv)
};
ret = sock_daemon_setup(mem_ctx, "ctdb-eventd", options.logging,
- options.debug_level, options.pidfile,
+ options.debug_level,
&daemon_funcs, ectx, &sockd);
if (ret != 0) {
goto fail;
@@ -1215,7 +1215,7 @@ int main(int argc, const char **argv)
goto fail;
}
- ret = sock_daemon_run(ev, sockd, options.pid);
+ ret = sock_daemon_run(ev, sockd, options.pidfile, options.pid);
if (ret == EINTR) {
ret = 0;
}