Re: Infinite Loops

From: Chris Gilbert (chris@buzzbee.freeserve.co.uk)
Date: 04/30/00


"Jon A. Nielsen" wrote:
>
> Hello,
>
> I'm writing to ask if anyone has devised a method to catch infinite loops in
> the MUD' code at runtime.  Essentially, I would like to build a system into
> the MUD by which the MUD would reboot itself in the case of an infinite
> loop.  I have seen this done elsewhere, but I don't know how to go about
> establishing such a system, and I imagine it would have to be an outside
> script that would shutdown the MUD, since if the code is looping, it would
> never reach a point outside of the loop.

It's already in there, signal_setup in comm.c has the section that sets
up a virtual timer, after 3 minutes it checks for tics=0, if it doesn't
it sets it to 0, and then 3 minutes later checks again.  In theory the
mud would reboot after 6 minutes at most.

Chris


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT