Yahoo Groups archive

Milter-greylist

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

Message

Re: [milter-greylist] dbdump command

2007-02-23 by Emmanuel Dreyfus

On Fri, Feb 23, 2007 at 11:25:04AM +0100, Oliver Fromme wrote:
> "The atexit() function shall register the function [...] to
> be called [...] at normal program termination.  At normal
> program termination, all functions registered by the atexit()
> function shall be called [...].  Normal termination occurs
> either by a call to exit() or a return from main()."

Which means that if you get a SIGSEGV, you loose.

> Since libmilter catches the signal and performs a controlled
> shutdown, the process is terminated normally by return from
> main().  Therefore the atexit() function should be executed.
> 
> In fact, it should be sufficient to simply put the final
> dump function after the call to smfi_main(), i.e. before
> returning normally from main().  I don't think it is
> necessary to use atexit() at all.

I thought smfi_main() was never returning. Does it?

-- 
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.