util: ctdb_fork() should call ctdb_set_child_info()
authorMartin Schwenke <martin@meltin.net>
Fri, 19 Apr 2013 04:54:03 +0000 (14:54 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Fri, 19 Apr 2013 06:27:09 +0000 (16:27 +1000)
For now we pass NULL as the child name.  Later we'll give ctdb_fork()
and friends an extra argument and pass that through.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
(backported from commit ba8866d40125bab06391a17d48ff06a4a9f9da89)

common/ctdb_util.c

index 79439f679d02e59eb706959623bc60351406d04b..5a29dcfc100206e31e671dcfa29daf30dd4d6350 100644 (file)
@@ -389,6 +389,8 @@ pid_t ctdb_fork_no_free_ringbuffer(struct ctdb_context *ctdb)
 
        pid = fork();
        if (pid == 0) {
+               ctdb_set_child_info(ctdb, NULL);
+
                /* Close the Unix Domain socket and the TCP socket.
                 * This ensures that none of the child processes will
                 * look like the main daemon when it is not running.