commit -- segfault handler on Unix


Subject: commit -- segfault handler on Unix
From: sam th (sam@uchicago.edu)
Date: Thu Jul 13 2000 - 00:50:24 CDT


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If you all read the interview with Joaquin, he mentioned that AbiWord
should never, ever lose user data. We had discussed this earlier on the
list, and the easiest way to do this is with a segfault handler, code that
executed anytime the program causes a segmentation fault. We now have
this. Some notes

1) In doing this, I added the operator [] to UT_Vector. You can now say
vec[4], just like an STL vector.

2) I added a global variable in ap_UnixApp.cpp. This was neccessary, and
is reccommended by the C++ FAQ. But I just wanted to apologize anyway.

3) This should be easy to implement on other platforms. I hope Win32
allows you to do something like this, and I believe that Be and QNX are
POSIX systems, so they should also support signals of the same type.

4) The function I used, signal(), is not the POSIX fuction, which is
sigaction(). Unfortunately, sigaction() is very complex, but I will fix
this eventually.

5) Should this catch other signals (SIGTERM, the bus error signal, etc)?

This won't save you if your OS crashes, but if we crash, we back up.

           
                                     sam th
                                     sam@uchicago.edu
                                http://www.abisource.com/~sam/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE5bViht+kM0Mq9M/wRAlYoAJ92ipvEbCcjirWuo3cMmVllpiLPaACgqQVE
GcR9sNlTmzh5Kkvk/dd7bkI=
=CeIu
-----END PGP SIGNATURE-----



This archive was generated by hypermail 2b25 : Wed Jul 12 2000 - 23:46:01 CDT