crash protection
David Relson
relson at osagesoftware.com
Sat Sep 6 17:10:57 CEST 2003
Matthias,
Clearly you have an idea of what to do. Go ahead and implement it :-)
David
On Sat, 06 Sep 2003 17:02:59 +0200
Matthias Andree <matthias.andree at gmx.de> wrote:
> David Relson <relson at osagesoftware.com> writes:
>
> > You've persuaded me. Sounds like crash protection is a bad idea.
> >
> > Every one agree?
> >
> > Does anyone dissent? Why?
>
> Yes, I dissent. The code is still useful to prevent DB corruption
> should we have opened the DB in write mode.
>
> > If there're no good arguments for keeping the crash protection code,
> > I'll delete it in 24 hrs.
>
> Well, we _can_ leave it in place so as to give the data base library
> we've linked against a chance of flushing its cache and maintain
> consistency, but we should report the error condition.
>
> The path I'd think would be
>
> if (setjmp(buffer)) {
> close_db();
> fprintf(stderr, "loud complaints with directions where and how
> to report the error\n"); exit(3);
> }
>
> We might consider catching SIGTERM ("kill") and SIGINT (Ctrl+C) as
> well(through sigsetjmp in that case) so as to prevent DB corruption in
> these cases as well.
>
> We just need to make sure that we don't leave to the user the
> slightest hint that it might have worked.
>
> --
> Matthias Andree
>
> Encrypt your mail: my GnuPG key ID is 0x052E7D95
>
> ---------------------------------------------------------------------
> FAQ: http://bogofilter.sourceforge.net/bogofilter-faq.html
> To unsubscribe, e-mail: bogofilter-dev-unsubscribe at aotto.com
> For summary digest subscription:
> bogofilter-dev-digest-subscribe at aotto.com For more commands, e-mail:
> bogofilter-dev-help at aotto.com
--
David Relson Osage Software Systems, Inc.
relson at osagesoftware.com Ann Arbor, MI 48103
www.osagesoftware.com tel: 734.821.8800
More information about the bogofilter-dev
mailing list