Update rules settings on the fly
Peter Bonivart
peter at UCGBOOK.COM
Thu Apr 8 22:37:13 IST 2004
Ugo Bellavance wrote:
> Usually, with restart, it kills all the processes and restarts them. With reload, it only sends the processes signals to re-read its config.
>
> However, when I reload MailScanner, I get this in my logs:
>
> Apr 8 16:37:24 mta1 MailScanner[27669]: MailScanner child caught a SIGHUP
> Apr 8 16:37:25 mta1 MailScanner[27669]: Config: calling custom end function MailWatchLogging
> Apr 8 16:37:25 mta1 MailScanner[27669]: Disconnected from the database
> Apr 8 16:37:25 mta1 MailScanner[30448]: MailScanner E-Mail Virus Scanner version 4.28.5 starting...
> Apr 8 16:37:25 mta1 MailScanner[30448]: Config: calling custom init function MailWatchLogging
> Apr 8 16:37:26 mta1 MailScanner[30448]: Initialising database connection
> Apr 8 16:37:26 mta1 MailScanner[30448]: Finished initialising database connection
> Apr 8 16:37:45 mta1 MailScanner[30448]: Using locktype = flock
>
> I guess Julian or Steve (mailwatch) would be better than me to explain the consequences.
I'm neither of them but I think I can explain it. Restart is terminating
(sending SIGTERM to) the parent process which in turn terminates all
child processes, then it starts it all up again, same as stop and then
start. When you reload you send the hangup signal (SIGHUP) to the parent
which terminates the child processes and start them up again. The parent
never dies that way but mail processing is still interrupted for a
moment before the new children pick up messages (only the children
process messages). There's no signal for re-reading the config, the
children do that whenever they start.
This is based on what I have observed, not on actually looking through
the code so I reserve the right to be completely wrong. ;-)
--
/Peter Bonivart
--Unix lovers do it in the Sun
Sun Fire V210, Solaris 9, Sendmail 8.12.10, MailScanner 4.29.7,
SpamAssassin 2.63 + DCC 1.2.39, ClamAV 0.70RC + GMP 4.1.2, MailStats 0.25
More information about the MailScanner
mailing list