]> git.ipfire.org Git - thirdparty/samba.git/commit
ctdb-daemon: Fork when not interactive and test mode is enabled
authorMartin Schwenke <martin@meltin.net>
Wed, 29 Jan 2020 05:28:46 +0000 (16:28 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 10 Feb 2020 04:07:39 +0000 (04:07 +0000)
commit1a0e1f89246685730612819d23a8398b340cb673
treea21f9f65596d3da8762a224491dfbb31b5c20a69
parenta220e9454a6dd56f3b0f317d9b4361d0328ff79a
ctdb-daemon: Fork when not interactive and test mode is enabled

There is no sane way of keeping stdin open when using the shell to
background ctdbd in local_daemons.sh.  Instead, have ctdbd fork when
not interactive and when test mode is enabled.  become_daemon() can't
be used for this: if it forks then it also closes stdin.

For the interactive case, become_daemon() wasn't doing anything
special, so do nothing instead.

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