ctdb-common: Add support for sock daemon to notify of successful startup
authorMartin Schwenke <martin@meltin.net>
Fri, 24 Aug 2018 04:44:12 +0000 (14:44 +1000)
committerStefan Metzmacher <metze@samba.org>
Wed, 5 Sep 2018 11:31:39 +0000 (13:31 +0200)
commit0e50da4c7ebede054a9f4cf8580e57a7a2aa0c96
treeb069da7f7c0728ac95647724b770daf0f13dfb5c
parentb53eb6f62f83126c28fc8b7d55831f74a589a158
ctdb-common: Add support for sock daemon to notify of successful startup

The daemon writes 0 into the specified file descriptor when it is up
and listening.  This can be used to avoid loops in clients that
attempt to connect until they succeed.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13592

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit dc6040c121c65d5551c686f3f1be2891795f48aa)
ctdb/common/sock_daemon.c
ctdb/common/sock_daemon.h