mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
ctdb-daemon: Enable log reopening for event daemon
Add and call hook to pass on SIGHUP to eventd. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
4f14d7c0b9
commit
51f0380e83
@ -1035,4 +1035,6 @@ int ctdb_event_script_args(struct ctdb_context *ctdb,
|
||||
int ctdb_event_script(struct ctdb_context *ctdb,
|
||||
enum ctdb_event call);
|
||||
|
||||
void ctdb_event_reopen_logs(struct ctdb_context *ctdb);
|
||||
|
||||
#endif
|
||||
|
@ -1496,6 +1496,7 @@ static void sighup_hook(void *private_data)
|
||||
if (ctdb->recoverd_pid > 0) {
|
||||
kill(ctdb->recoverd_pid, SIGHUP);
|
||||
}
|
||||
ctdb_event_reopen_logs(ctdb);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -837,3 +837,10 @@ int ctdb_event_script(struct ctdb_context *ctdb, enum ctdb_event call)
|
||||
/* GCC complains about empty format string, so use %s and "". */
|
||||
return ctdb_event_script_args(ctdb, call, NULL);
|
||||
}
|
||||
|
||||
void ctdb_event_reopen_logs(struct ctdb_context *ctdb)
|
||||
{
|
||||
if (ctdb->ectx->eventd_pid > 0) {
|
||||
kill(ctdb->ectx->eventd_pid, SIGHUP);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user