ctdb-daemon: Don't set log_to_stdout for become_daemon()
authorMartin Schwenke <martin@meltin.net>
Thu, 18 Oct 2018 06:47:55 +0000 (17:47 +1100)
committerAmitay Isaacs <amitay@samba.org>
Tue, 6 Nov 2018 06:16:15 +0000 (07:16 +0100)
ctdbd logs to stderr in interactive mode, not stdout.  This way stdout
is always closed.

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

index 8247859f9b57e33f1d15e7f7665a372ff7d0cd79..aac331dd1dd4dd52c404be256d2bc527da6b225d 100644 (file)
@@ -1230,7 +1230,7 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork)
        int res, ret = -1;
        struct tevent_fd *fde;
 
-       become_daemon(do_fork, !do_fork, !do_fork);
+       become_daemon(do_fork, !do_fork, false);
 
        ignore_signal(SIGPIPE);
        ignore_signal(SIGUSR1);