Re: [RELEASE] [CODE] [LONG] Guilds Code Info.

From: Akuma/Chris Baggett/DOOMer (doomer18@EARTHLINK.NET)
Date: 04/29/98

At 03:26 PM 4/29/98 -0400, you wrote:
>Tony Robbins <tonyr@NWPACLINK.COM> writes:

[ some stuff about macros i don't agree with snipped

>ObCircle: Has anyone done anything like catching SIGSEGVs, writing a
>copyover file (assuring certain integrity first), and rebooting that
>way?  No lost connections.  This is a simplified version of using
>mprotect to ensure safe saves when segment violations happen, and
>would be a fairly easy first-step.

hehehe, funny you should mention that.
I just tested this theory, and it's one of the coolest yet (of course,
the system won't crash, and you won't ever find the bugs, but hey! :-P

install the copyover patch from the web site
(i think it works for all systems)
and modify it to where you don't need a char_data *
to succeed (ie, maybe instead of  "Copyover by (GET_NAME)" have
"Copyover by SYSTEM")  from there.

and in the segfault section (i doubt Win95 has an error
catcher function like Circle for UNIX has [my_signal()])
(ie, i think it only works on UNIX systems)

anyway, just put this there,

do_copyover(NULL, "", 0, 0);

right before the exit(0);    because if do_copyover was successful,
you'll never get the exit().

I don't know if this'll work for all SIGSEGV's, but i did it
by causing a SIGSEGV like so
  char *p = NULL;
to test it.   i doubt it will work for  Divide by Zero errors,
but it's worth a shot .....  lemme test that theory

well, shrug. i dunno.  i've tried every which way i can think of to
pull a Divide by Zero error, but it won't let me do it.

anyway, just do that and it'll work :-)

not recommended for people who want to find out where the
crashes are coming from :-)

Code On
Akuma the Raging Coder

  |     "Yea, though I code in the Valley of the Shadow of No      |
  | Documentation, I will fear no task: for thy C Book is with me" |
  |          "Nothing is IMPOSSIBLE, Just IMPROBABLE"              |
  |     "Easier Said Than Done, But Better Done Than Said..."      |

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

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