Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > MUD Coding
Click here to Register

Reply
 
Thread Tools
Old 06-27-2002, 11:47 PM   #1
Emit
New Member
 
Join Date: May 2002
Location: Kentucky
Posts: 14
Emit is on a distinguished road
Send a message via AIM to Emit
we've been having some problems with crashes at the mud i code for.  sometimes it will crash and the parent process dies too (a startup script running on a loop).  when this happens the mud is down for hours at a time, since only two people can get to the server.  we have a copy of the game running on another port, completely independant of the main one, and its up all the time.
until we get all these bugs under control, i was thinking of writing a command for the test port that would run the startup script for the main port (so staff members can start the main game up with out going to the server), but i don't know of a way to do this.
any suggestions?
Emit is offline   Reply With Quote
Old 06-28-2002, 01:15 AM   #2
thelenian
Member
 
Join Date: Apr 2002
Posts: 122
thelenian is on a distinguished road
Codebase? Dev platform? Host OS?
thelenian is offline   Reply With Quote
Old 06-30-2002, 02:19 PM   #3
Emit
New Member
 
Join Date: May 2002
Location: Kentucky
Posts: 14
Emit is on a distinguished road
Send a message via AIM to Emit
its a rom mud on a server running redhat 7.2
Emit is offline   Reply With Quote
Old 07-19-2002, 10:50 PM   #4
LordKiev
New Member
 
Join Date: Apr 2002
Location: Atlanta, GA
Posts: 8
LordKiev is on a distinguished road
Send a message via AIM to LordKiev
Um... Trying to think. Basically, just write a command (startmain) or something, and have it execute a system call. The sytanx would be system("command"); so, depending, somthing like:

[code]
void do_startmain(char *argument, CHAR_DATA *ch)
{
if(!IS_IMMORTAL(ch))
return;
system("./../area/startup 3345")
return;
}
[/quote]
This hasn't been bug-tested, but that's the general assumption, assuming you're running them off the exact same code. If you're not, and especially if they're run off different accounts, then that's more about Linux than I know. But essentially make the system call to wherever the startup script is. But I'm curious, are the two sets of code the same? Same account, same privledges, etc?
LordKiev is offline   Reply With Quote
Old 07-20-2002, 09:34 PM   #5
Robbert
Member
 
Join Date: Apr 2002
Location: #### Paso, Tx
Posts: 89
Robbert is on a distinguished road
Send a message via ICQ to Robbert Send a message via AIM to Robbert
I strongly recommend doing more than just a system call. At the very least, check against the game running already, and if it is abort the command. You could do even better by adding this to the startup script. Take it one step further and add a panic-exit to the script if logfile > 1000 increments. A very large number of admins out there will end up starting 2 or more processes of the startup script, and then kill them hours or days later (or the sysadmins will), but there are > 10000 logfiles created by that time, which must be iterated through in the startup process.... bah

Check for the game running, and save yourself and others some heartache later.
Robbert is offline   Reply With Quote
Old 07-21-2002, 08:44 AM   #6
thelenian
Member
 
Join Date: Apr 2002
Posts: 122
thelenian is on a distinguished road
The simplist approach I can think of would bypass system calls completely. Just do message passing through a file. It's sort of a kludge, but it gets the job done.

All you need is a perl script running in the background that continually checks for the existance of a certain file. If the file exists, the script executes whatever checks are necessary to ensure that it's a valid boot attempt, calls the boot script., and then deletes the file.

The command to reboot the MUD from the test port would simply create the file that the script checks for.

This will work even if your test MUD is on a different account, as long as the script is running with the proper permissions.

edit:

Regarding security, this solution is very good. The test mirror account doesn't need to have write,exec, or even read permission on the live account.
thelenian is offline   Reply With Quote
Reply


Thread Tools


system calls - Similar Threads
Thread Thread Starter Forum Replies Last Post
Account System Yay or Nay darmir Advanced MUD Concepts 15 04-26-2006 10:04 PM
Stats System darmir Advanced MUD Concepts 14 03-10-2006 05:17 PM
New Library System in Achaea! Maya Advertising for Players 0 07-05-2005 01:39 AM
Crafting system KaVir Advanced MUD Concepts 22 04-15-2005 03:39 AM
Combat system Blade MUD Coding 3 11-07-2003 08:03 PM

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 12:59 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2022