mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
ctdb-recoverd: Add basic log reopening
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
4ed37de82b
commit
4acfefed61
@ -2916,6 +2916,7 @@ static void monitor_cluster(struct ctdb_context *ctdb)
|
||||
{
|
||||
struct tevent_signal *se;
|
||||
struct ctdb_recoverd *rec;
|
||||
bool status;
|
||||
|
||||
DEBUG(DEBUG_NOTICE,("monitor_cluster starting\n"));
|
||||
|
||||
@ -2935,6 +2936,15 @@ static void monitor_cluster(struct ctdb_context *ctdb)
|
||||
rec->priority_time = timeval_current();
|
||||
rec->frozen_on_inactive = false;
|
||||
|
||||
status = logging_setup_sighup_handler(rec->ctdb->ev,
|
||||
rec,
|
||||
NULL,
|
||||
NULL);
|
||||
if (!status) {
|
||||
D_ERR("Failed to install SIGHUP handler\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
se = tevent_add_signal(ctdb->ev, ctdb, SIGTERM, 0,
|
||||
recd_sig_term_handler, rec);
|
||||
if (se == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user