mirror of
https://github.com/samba-team/samba.git
synced 2025-03-11 16:58:40 +03:00
ctdb-recoverd: Pass SIGHUP to running helper
The recovery and takeover helpers can run for a while and generate non-trivial logs, so have them reopen their logs to support log rotation. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Mon Jan 17 04:36:30 UTC 2022 on sn-devel-184
This commit is contained in:
parent
8e949a6082
commit
57a32cebdd
@ -2913,6 +2913,16 @@ done:
|
||||
}
|
||||
}
|
||||
|
||||
static void recd_sighup_hook(void *private_data)
|
||||
{
|
||||
struct ctdb_recoverd *rec = talloc_get_type_abort(
|
||||
private_data, struct ctdb_recoverd);
|
||||
|
||||
if (rec->helper_pid > 0) {
|
||||
kill(rec->helper_pid, SIGHUP);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
the main monitoring loop
|
||||
*/
|
||||
@ -2943,8 +2953,8 @@ static void monitor_cluster(struct ctdb_context *ctdb)
|
||||
|
||||
status = logging_setup_sighup_handler(rec->ctdb->ev,
|
||||
rec,
|
||||
NULL,
|
||||
NULL);
|
||||
recd_sighup_hook,
|
||||
rec);
|
||||
if (!status) {
|
||||
D_ERR("Failed to install SIGHUP handler\n");
|
||||
exit(1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user