msg_info ("worker's shutdown is pending in %d sec", SOFT_SHUTDOWN_TIME);
event_base_loopexit (sigh->base, &tv);
}
+
+ if (sigh->post_handler) {
+ sigh->post_handler (sigh->handler_data);
+ }
}
/*
(struct rspamd_worker_signal_handler *)arg;
reopen_log (sigh->worker->srv->logger);
+
+ if (sigh->post_handler) {
+ sigh->post_handler (sigh->handler_data);
+ }
}
static void
ProfilerStop ();
#endif
}
+
+ if (sigh->post_handler) {
+ sigh->post_handler (sigh->handler_data);
+ }
}
static void
{
struct rspamd_worker_signal_handler *sigh;
- sigh = g_malloc (sizeof (*sigh));
+ sigh = g_malloc0 (sizeof (*sigh));
sigh->signo = signo;
sigh->worker = worker;
sigh->base = base;