ctdb-tools-ctdb: Don't close stderr when running without_daemon commands
authorMartin Schwenke <martin@meltin.net>
Mon, 17 Mar 2014 02:28:14 +0000 (13:28 +1100)
committerAmitay Isaacs <amitay@samba.org>
Sun, 23 Mar 2014 03:20:14 +0000 (04:20 +0100)
It looks like the original without_daemon code still tried to
establish a client connection to the daemon.  Closing stderr looks to
be a cheap way of hiding the errors when this failed.

However, later cleanups avoid the client connection altogether, so do
not close stderr.  Now debug output from without_daemon commands
actually appears.

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

index d44c3476afe0782887c95802c1c8a0fa317826e4..5ad5d1aadeeb22a0564a0184b2a1c59d736730e6 100644 (file)
@@ -6433,7 +6433,6 @@ int main(int argc, const char *argv[])
                        DEBUG(DEBUG_ERR, ("Can't specify node(s) with \"ctdb %s\"\n", control));
                        exit(1);
                }
-               close(2);
                return ctdb_commands[i].fn(NULL, extra_argc-1, extra_argv+1);
        }