(Fwd) run MailScanner in foreground (non-debugging)

Mariano Absatz mailscanner at LISTS.COM.AR
Mon Apr 26 19:56:14 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
----------------------------------------------------------
Room Service? Send up a larger room.
      -- Groucho Marx

-------------------------- MailScanner list ----------------------
To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
For further info about MailScanner, please see the Most Asked
Questions at    http://www.mailscanner.biz/maq/     and the archives
at    http://www.jiscmail.ac.uk/lists/mailscanner.html



More information about the MailScanner mailing list