ted@ut-emx.UUCP (Ted Woodward) (05/12/89)
I have a very strange problem: when I try to make the universe, it core dumps. Then when I use the -v flag (verbose, read makeuniv.doc) it works just fine! ARGH! Also, some docs on exactly what the daemon does would be useful-- I don't particularly want to plod thru its sources right now... Also, how much cpu time does the daemon use? I don't want to run out of ca$h (yes, I know it depends on how many people are playing and how much is being done, but I would like some figures. And the # of people, etc to go along with them. Ted (ted@emx.utexas.edu)--------------------'Laugh while you can, monkey boy!'
joel@dtscp1.UUCP (Joel Rives) (05/13/89)
In article <12985@ut-emx.UUCP> ted@ut-emx.UUCP (Ted Woodward) writes: >Also, some docs on exactly what the daemon does would be useful-- >I don't particularly want to plod thru its sources right now... The source for the actual demon itself is fairly small and contained in the file daemon.c. Basically, it forks a process which seperates itself from the invokers terminal process (so, that it will persist after the user that has invoked the daemon has logged off). This child process then sets up a state and puts itself to sleep for a short while. When the process wakes up, it compares a state variable (setable in tweakables.h) to the current time stamp of the host machine. If it is time to run the turn, this daemon calls the function doturn() to handle the necissary dirty work and then puts itself back to sleep again. The same sort of functionality could be had very simply by making use of the Unix 'at' command (on Unix machines -- of course :-). This method has an advantage over the daemon process in that it is independant of whether the machine goes down at some point during the day. Unless the daemon process is set up to be automatically started when the machine comes up, the turns will cease to be updated until such time as the game controller can log on and start the daemon again. Joel