Warm Boot and Compiling

From: erwin (erwin@pip.dknet.dk)
Date: 09/13/96

On Fri, 13 Sep 1996, The Chuckster wrote:

> Has anyone modified their mud to allow warm reboots? Is this
> sort of thing OS dependent or what? I have worked on a mud
> that could do warm reboots (I was only an IMM so I could not see
> the code) and players would not even have to log off. 

If your OS has the exec call, and all Unices do, you can do it.

For the code (for a MERC+ MUD, however) see:

ftp://pip.dknet.dk/pub/pip1773/copyover.v1 (or so)

I don't use Circle, and a brief look at the comm.c of Circle shows a lot 
of differences...

The general ideas is however:

Find out who is on. Save name of each character plus descriptor they are 
getting data from (the number of the file descriptor) into a file.

Save the number of control descriptor.

Call exec() on the binary file. This is much like starting the program up 
again - BUT all the files that are open are still open, so that includes 
the sockets too.

Now bring system back to hwo it was before - read in all the players and 
log them into the game, at their respective sockets.

Erwin Andreasen  Viby J, Denmark   Computer Science Student at Aarhus Business
4u2@aabc.dk   <A HREF="http://pip.dknet.dk/~pip1773">Click here!</A>   College

| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |

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