diff options
author | Martin Schwenke <martin@meltin.net> | 2021-09-30 21:11:44 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2022-01-17 03:43:30 +0000 |
commit | 4f14d7c0b9bf1f122a1e9f92c1b8bdc57c4c9e68 (patch) | |
tree | 25f92c8e4dbe249efa9613c2b34041f100282e3f /ctdb/event | |
parent | c554a325fe81aab90f4816600849f6c4f901b2f9 (diff) | |
download | samba-4f14d7c0b9bf1f122a1e9f92c1b8bdc57c4c9e68.tar.gz |
ctdb-event: Reopen logs on SIGHUP
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/event')
-rw-r--r-- | ctdb/event/event_daemon.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ctdb/event/event_daemon.c b/ctdb/event/event_daemon.c index b6c01761e91..d96ff6f172f 100644 --- a/ctdb/event/event_daemon.c +++ b/ctdb/event/event_daemon.c @@ -74,6 +74,15 @@ static int event_daemon_reconfigure(void *private_data) return 0; } +static int event_daemon_reopen_logs(void *private_data) +{ + bool status; + + status = logging_reopen_logs(); + + return status ? 0 : 1; +} + static void event_daemon_shutdown(void *private_data) { struct event_daemon_state *e_state = talloc_get_type_abort( @@ -307,6 +316,7 @@ int main(int argc, const char **argv) daemon_funcs = (struct sock_daemon_funcs) { .startup = event_daemon_startup, .reconfigure = event_daemon_reconfigure, + .reopen_logs = event_daemon_reopen_logs, .shutdown = event_daemon_shutdown, }; |