Warmboot/Copyover/Hotboot/whatever has many many snippets posted world-wide. I'd simply like to know what it does, in the simplest terms possible. As in, basic steps.
Warm-booting, in its simplest form.
Posted by Marowi on Thu 22 Apr 2004 08:55 AM — 2 posts, 12,146 views.
Well, each one is usually different. For example, Erwins copyover just does the basic steps, where Samson's Hotboot is based on Erwins, but saves all the mobs and objects were they are, and mine saves almost everything, engineering skills, mobs, objects, ships, etc. The one to use is dependant on your needs. Here is the basic concept though:
1. Open a file, and save each player descriptors info into it, like, a players character, the port they are connected through, etc.
2. Save this file and close it.
3. Call "execl()" system function, booting a new version of the game, dependant on the values you pass execl(like port and name and such). The new one will inheiret the parent descriptors, and kill the parent program.
4. While booting the mud on the new one, loadup all the player file, and set up the descriptors again, based on the info that was written to the copyover file
Hope that helps some, its better to look through the code.
1. Open a file, and save each player descriptors info into it, like, a players character, the port they are connected through, etc.
2. Save this file and close it.
3. Call "execl()" system function, booting a new version of the game, dependant on the values you pass execl(like port and name and such). The new one will inheiret the parent descriptors, and kill the parent program.
4. While booting the mud on the new one, loadup all the player file, and set up the descriptors again, based on the info that was written to the copyover file
Hope that helps some, its better to look through the code.