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>
int ctdb_event_script(struct ctdb_context *ctdb,
enum ctdb_event call);
+void ctdb_event_reopen_logs(struct ctdb_context *ctdb);
+
#endif
if (ctdb->recoverd_pid > 0) {
kill(ctdb->recoverd_pid, SIGHUP);
}
+ ctdb_event_reopen_logs(ctdb);
}
/*
/* 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);
+ }
+}