mirror of
https://github.com/samba-team/samba.git
synced 2025-01-21 18:04:06 +03:00
ctdb-daemon: Add basic top-level log reopening
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
7277385390
commit
4ed37de82b
@ -1495,6 +1495,7 @@ int ctdb_start_daemon(struct ctdb_context *ctdb,
|
||||
bool interactive,
|
||||
bool test_mode_enabled)
|
||||
{
|
||||
bool status;
|
||||
int ret;
|
||||
struct tevent_fd *fde;
|
||||
|
||||
@ -1548,6 +1549,15 @@ int ctdb_start_daemon(struct ctdb_context *ctdb,
|
||||
ctdb_tevent_trace_init();
|
||||
tevent_set_trace_callback(ctdb->ev, ctdb_tevent_trace, ctdb);
|
||||
|
||||
status = logging_setup_sighup_handler(ctdb->ev,
|
||||
ctdb,
|
||||
NULL,
|
||||
NULL);
|
||||
if (!status) {
|
||||
D_ERR("Failed to set up signal handler for SIGHUP\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* set up a handler to pick up sigchld */
|
||||
if (ctdb_init_sigchld(ctdb) == NULL) {
|
||||
DEBUG(DEBUG_CRIT,("Failed to set up signal handler for SIGCHLD\n"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user