Christian Loth <sg618lo@UNIDUI.UNI-DUISBURG.DE> writes:
> Greetings,
>
> This is not recommended at all, because after a SIGSEGV the
> state of a program is undefined if you catch the signal - moreover this
> really screws up any chances of debugging.
Yah, it is undefined, but it isn't all that bad. This is possible:
(in the sigsegv handler)
if (fork() == 0) { /* parent process */
*NULL = 0; /* force the crash */
}
else { /* child process */
execute the mud
}
The memory might be undefined, but not the system itself.
Another alternative: whenever a player logs in or out, write a new
copyover file. Then when it crashes, use the sig handler to call the
execlv and you're using data from a defined state.
Players would love it.
--
James Turner turnerjh@xtn.net
http://www.vuse.vanderbilt.edu/~turnerjh/
+------------------------------------------------------------+
| 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