ctdb-common: Move PID file creation to sock_daemon_run_send()
authorAmitay Isaacs <amitay@gmail.com>
Mon, 28 Aug 2017 08:39:40 +0000 (18:39 +1000)
committerAmitay Isaacs <amitay@samba.org>
Tue, 29 Aug 2017 09:14:09 +0000 (11:14 +0200)
commitb67cc00c9335d899402d28f229d2b4416dc8a674
tree6ef1ed85c5db9f63bf4813b3e15891876829f71a
parentfc6fdde60fadf88be3ef9a116feff70fe97a052e
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>
ctdb/common/sock_daemon.c
ctdb/common/sock_daemon.h
ctdb/server/ctdb_eventd.c
ctdb/tests/src/sock_daemon_test.c