Re: Infinite Loops

From: Edward J Glamkowski (eglamkowski@angelfire.com)
Date: 04/30/00


> 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.

On a windows machine, the program will stop responding if it hits
an infinite loop, but I'm not sure how unix will handle it.

The best solution, of course, is to identify and correct the infinite
loop in the code.  At the vey least, any code that seems probable to
have an infinite loop in it should have a counter in the loop and
when the counter reaches some sufficiently large number, break out
and log a message about a probable infinite loop.




Angelfire for your free web-based e-mail. http://www.angelfire.com


     +------------------------------------------------------------+
     | 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