diff --git a/src/lib-sieve-tool/sieve-tool.c b/src/lib-sieve-tool/sieve-tool.c index 4e261f7b804dc086f32f9222840cf9c0dbc73610..e02054593c817a2885c966582931a6eb940723b3 100644 --- a/src/lib-sieve-tool/sieve-tool.c +++ b/src/lib-sieve-tool/sieve-tool.c @@ -27,16 +27,19 @@ static struct ioloop *ioloop; * Signal handlers */ -static void sig_die(int signo, void *context ATTR_UNUSED) +static void sig_die(const siginfo_t *si, void *context ATTR_UNUSED) { - /* Warn about being killed because of some signal, except SIGINT (^C) + /* warn about being killed because of some signal, except SIGINT (^C) * which is too common at least while testing :) */ - if (signo != SIGINT) - i_warning("killed with signal %d", signo); - - io_loop_stop(ioloop); - exit(1); + if (si->si_signo != SIGINT) { + /* FIMXE: strange error for a command line tool */ + i_warning("Killed with signal %d (by pid=%s uid=%s code=%s)", + si->si_signo, dec2str(si->si_pid), + dec2str(si->si_uid), + lib_signal_code_to_str(si->si_signo, si->si_code)); + } + io_loop_stop(current_ioloop); } /*