PDA

View Full Version : Daemonize!!


bot403
06-05-2002, 03:57 PM
this would probably require too much work but i think a neat feature would be letting the world server daemonize on Linux. This would let me not need to have an openshell since my computer is downstairs and i either have to SSH in, or run it down there without being able to see the output. and where is the option to output to a logfile for the worldserver :p

Either of those features would be nice.

zorprime
06-05-2002, 08:32 PM
Set up a crontab to call zone for you and check it every couple of minutes to keep it running. Set the uid for nobody so in case there's some unforseen bug you don't get rooted (that is of course if zone can run on any other userid besides root. I don't know, haven't delved too far into it.

bot403
06-06-2002, 12:32 AM
that still doesnt mean i can run the worldserver without a shell. If the calling shell exits, the worldserver also exits. THe zoneservers daemonize fine....i think....:confused:

theCoder
06-08-2002, 05:31 AM
It's not a true daemon, but you can download the script I posted in the NAT thread (http://forums.eqemu.net/showthread.php?s=&threadid=1134) (it's near the end, eqemud.zip) to simulate it. It'll probably work for what you need to do, but you'll probably have to modify it just a little bit to meet your needs.

zorprime
06-08-2002, 07:46 AM
Why does world need a shell? If you just called it in a script wouldn't it send its output to stdout which in this case would be syslogd?

bot403
06-08-2002, 10:14 AM
no because the script is launched in the same shell you use to call it. The script I created to launch and check on the servers still considers the parent shell stdout, it still outputs to the screen. I could redirect all the output, but that doesnt change the fact it launched from a shell.

PrivateIdaho
06-08-2002, 01:14 PM
I run into zone servers being "hung" requiring a CTRL-C often.. daemon-izing would require some sort of "heartbeat" that a world server would need to answer..

If the world server didn't answer, kill it and move on.

bot403
06-09-2002, 02:23 AM
I notice if zoneservers are killed then they are removed from the worldservers list of good servers. I just created a script to keep all the servers running if they segfault, that might help alot of ppl