Re: abort()ing inside segv handler

From: Erwin S. Andreasen (erwin@ANDREASEN.COM)
Date: 07/01/98


On Tue, 30 Jun 1998, James Turner wrote:

> Has anyone had any experience with getting a clean core file using
> abort() (or any other piece of crashing code) inside a SEGV handler?

I just signal(signo, SIG_DFL) and return.

Actually, I do:

if (fork()) == child) {
        if (fork()) == child) {
                return; // and dump core
        } else {
                exec script which waits for 120 seconds
                and checks if there is gdb interactive running
                if not, analyze core, mail me results and gzip it
                if yes, just do nothing, I am then online and looking on
                it
        }
}
else {
        exec() and keep all players connected
}

 =============================================================================
<erwin@andreasen.com>      Herlev, Denmark              UNIX System Programmer
<URL:http://www.abandoned.org/drylock/>     <*>         (not speaking for) DDE
 =============================================================================


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST