Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] dump greylist.db on SIGTERM

2005-12-20 by Emmanuel Dreyfus

On Tue, Dec 20, 2005 at 10:36:12AM +0100, Michael Menge wrote:
> I havent done any signal handling in my own programs but there are some 
> lines in the code which make me think milter-greylist should dump it's db.

signal handling is forbidden by the milter API. We have a callback on exit,
but AFAIK that does not work if you get a deadly signal.

> After SIGTERM the program should execute exit() by default, but there 
> where no syslog entries form final_dump so it did not get called.

On a fatal signal, the kernel exit the program, by calling the exit system
call in the kernel, but as the libc exit function in userland is not called, 
the exit hook cannot be run. At least that's how I understand the thing.

If we want to remote control milter-greylist dumping, we need to have
a socket control. The easiest way is to reuse the MX sync protocol and 
add a dump command. That would be easy.

-- 
Emmanuel Dreyfus
manu@...

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.