ctdb-daemon: Shut down if interactive and stdin is closed
authorMartin Schwenke <martin@meltin.net>
Mon, 13 Jan 2020 10:04:54 +0000 (21:04 +1100)
committerMartin Schwenke <martins@samba.org>
Tue, 28 Jan 2020 09:57:32 +0000 (09:57 +0000)
commitcf460bd9c4ae1e0de871a6c4980a2c365e82550a
tree554215354442b840a66ba6aa9f0cbb6dc55d4d30
parentd79e2dcfc84d937db3c6eb3d17520aaf6e7bba4c
ctdb-daemon: Shut down if interactive and stdin is closed

This allows a test environment to simply close its end of a pipe to
cleanly shutdown ctdbd.  Like in smbd, this is only done if stdin is a
pipe or a socket.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_daemon.c