rmilter
rmilter copied to clipboard
stale socket and clean exit
i noticed that there is no sign term and kill handlers. so on daemon shutdown, the socket is not closed and removed, so the init o systemd scripts cannot restart it. moreover, there area no SIGINT, SIGTERM, SIGQUIT (and SIGKILL?) handlers to call smfi_stop() to exit cleanly.
a quick fix for the socket could be:
--- main.c.orig 2015-03-20 23:17:14.000000000 +0100 +++ main.c 2015-04-22 13:14:42.741365365 +0200 @@ -275,7 +275,7 @@ msg_warn ("main: cannot start reload thread, ignoring error"); }
-
if (smfi_opensocket(0) == MI_FAILURE) {
-
if (smfi_opensocket(TRUE) == MI_FAILURE) { msg_err("Unable to open listening socket"); exit(EX_UNAVAILABLE); }
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.