[long] Recovery handling in TXN branch

Tom Anderson tanderso at oac-design.com
Mon Aug 16 14:04:54 CEST 2004


On Sat, 2004-08-14 at 18:25, Matthias Andree wrote:
> I know it will work well, but I'm still unclear how the requirements can
> be integrated. If the system crashes, the parent process is also gone
> and can take no further action, so the bogolock parent would have to
> save state information in a way that allows to detect crashes.

If you're using the daemon model, then a daemon process should check for
its own lockfile before starting.  Only one bogofilter daemon should be
running at any one time.  Ping the pid specified in the lockfile with a
signal and wait for the predetermined reply (TBD).  If no reply is
heard, do recovery and start the daemon.  If a reply is heard, simply
quit.  This should handle the reboot situation.

Something similar should work with standalone processes as well, pinging
the pid with a signal.  If the OS reassigns the pid, then the new owner
(eg apache) won't respond as defined, and it can be assumed that the
original owner quit or is hung.  Do recovery.

Tom





More information about the bogofilter-dev mailing list