run MailScanner in foreground (non-debugging)

Mariano Absatz mailscanner at LISTS.COM.AR
Mon Apr 19 00:37:40 IST 2004


Hi Julian,

it'd be nice to be able to give MailScanner an option to run in the
foreground so it can be controlled by something like daemontools supervise
(see http://cr.yp.to/daemontools.html
http://cr.yp.to/daemontools/supervise.html and
http://cr.yp.to/daemontools/svc.html ). I also know of high availability
clustering software that also requires that managed daemons run in the
foreground.

I think it should be a matter of not calling ForkDaemon() if this option is
given (but somehow setting "$SIG{'CHLD'} = \&Reaper;", anyway)... so the
'parent MailScanner' is the original one (and not is child) and the children
are directly forked by it...

Not closing stdout/stderr also allows us to call something to capture any
output from the process and log it somehow (see
http://cr.yp.to/daemontools/multilog.html ). This would help capturing some
errors that, up to now I had to chase manually inserting Log calls.

What do U think?

Regards.

--
Mariano Absatz
El Baby
----------------------------------------------------------
Give me ambiguity or give me something else.



More information about the MailScanner mailing list