ctdb-daemon: Move ctdb_fork.c to server
authorAmitay Isaacs <amitay@gmail.com>
Wed, 11 Nov 2015 03:26:53 +0000 (14:26 +1100)
committerMartin Schwenke <martins@samba.org>
Sun, 15 Nov 2015 23:46:14 +0000 (00:46 +0100)
These functions are only used in the ctdb daemon code.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
ctdb/common/common.h
ctdb/include/ctdb_private.h
ctdb/server/ctdb_fork.c [moved from ctdb/common/ctdb_fork.c with 100% similarity]
ctdb/tests/src/ctdb_test.c
ctdb/tests/src/ctdbd_test.c
ctdb/wscript

index 1cf8a7db28b3a0b8409af97dc1640701843929c9..b89a84cf4357d4a3de979dfdf7b681c6badd58c6 100644 (file)
 #ifndef __CTDB_COMMON_H__
 #define __CTDB_COMMON_H__
 
-/* From common/ctdb_fork.c */
-
-void ctdb_set_child_info(TALLOC_CTX *mem_ctx, const char *child_name_fmt, ...);
-
-void ctdb_track_child(struct ctdb_context *ctdb, pid_t pid);
-
-pid_t ctdb_fork(struct ctdb_context *ctdb);
-
-struct tevent_signal *ctdb_init_sigchld(struct ctdb_context *ctdb);
-
-int ctdb_kill(struct ctdb_context *ctdb, pid_t pid, int signum);
-
 /* From common/ctdb_io.c */
 
 int ctdb_queue_length(struct ctdb_queue *queue);
index 114d7c468c8f6ffabc766af9cac5aaa4786936a8..253b67dc67b9333b3617c9a89509d86d81297668 100644 (file)
@@ -647,6 +647,18 @@ void ctdb_shutdown_sequence(struct ctdb_context *ctdb, int exit_code);
 int switch_from_server_to_client(struct ctdb_context *ctdb,
                                 const char *fmt, ...);
 
+/* From server/ctdb_fork.c */
+
+void ctdb_set_child_info(TALLOC_CTX *mem_ctx, const char *child_name_fmt, ...);
+
+void ctdb_track_child(struct ctdb_context *ctdb, pid_t pid);
+
+pid_t ctdb_fork(struct ctdb_context *ctdb);
+
+struct tevent_signal *ctdb_init_sigchld(struct ctdb_context *ctdb);
+
+int ctdb_kill(struct ctdb_context *ctdb, pid_t pid, int signum);
+
 /* from server/ctdb_freeze.c */
 
 int32_t ctdb_control_db_freeze(struct ctdb_context *ctdb,
index 0ef8b8e188a16ce557b347b5abfc84a6404431f9..75d10ae680815d41351fea18da40ae97c48f51dd 100644 (file)
@@ -176,7 +176,6 @@ ctdb_get_capabilities(struct ctdb_context *ctdb,
 #include "common/srvid.c"
 #include "common/rb_tree.c"
 #include "common/ctdb_logging.c"
-#include "common/ctdb_fork.c"
 #include "common/system_util.c"
 #include "common/reqid.c"
 
index c2155f5fd708cfdf86da45dd82d05209f5e2093d..1a36484b45475d300c8858c47aacd6479b2768cf 100644 (file)
@@ -46,7 +46,6 @@ bool fast_start;
 #include "common/cmdline.c"
 #include "common/rb_tree.c"
 #include "common/ctdb_logging.c"
-#include "common/ctdb_fork.c"
 #include "common/system_util.c"
 #include "common/reqid.c"
 
@@ -76,6 +75,7 @@ bool fast_start;
 #include "server/ctdb_statistics.c"
 #include "server/ctdb_update_record.c"
 #include "server/ctdb_lock.c"
+#include "server/ctdb_fork.c"
 
 /* CTDB_CLIENT_OBJ */
 #include "client/ctdb_client.c"
index cea9e42a49ca84d1a2f9ebe0c4b3a3cce18593ed..71973476e0fa7059d54b444dafe428a651abb095 100755 (executable)
@@ -332,8 +332,7 @@ def build(bld):
     bld.SAMBA_SUBSYSTEM('ctdb-common',
                         source=bld.SUBDIR('common',
                                           '''ctdb_io.c ctdb_util.c ctdb_ltdb.c
-                                             cmdline.c rb_tree.c
-                                             ctdb_fork.c'''),
+                                             cmdline.c rb_tree.c'''),
                         includes='include',
                         deps='replace popt talloc tevent tdb popt ctdb-system')
 
@@ -396,7 +395,7 @@ def build(bld):
                                              ctdb_vacuum.c ctdb_banning.c
                                              ctdb_statistics.c
                                              ctdb_update_record.c
-                                             ctdb_lock.c'''),
+                                             ctdb_lock.c ctdb_fork.c'''),
                         includes='include',
                         deps='replace popt talloc tevent tdb talloc_report')