These don't need to depend on do_fork. Child logging should be set up
whenever the daemon is not interactive. The stdin handler should be
setup whenever test mode is enabled.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
exit(1);
}
- if (do_fork) {
+ if (!interactive) {
ctdb_set_child_logging(ctdb);
}
/* Exit if stdin is closed */
- if (!do_fork) {
+ if (test_mode_enabled) {
ret = setup_stdin_handler(ctdb);
if (ret != 0) {
DBG_ERR("Failed to setup stdin handler\n");