Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ Running the server ➜ Bad idea to break out of an infinite loop?

Bad idea to break out of an infinite loop?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Zeno   USA  (2,871 posts)  Bio
Date Mon 12 Dec 2005 07:50 PM (UTC)
Message
Is it a bad idea to break out of an infinite loop by attaching gdb to the process, and doing a return out of the function?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Nick Gammon   Australia  (23,163 posts)  Bio   Forum Administrator
Date Reply #1 on Mon 12 Dec 2005 07:54 PM (UTC)
Message
I assume you mean as an emergency measure? ;)

I can't see a big problem with that, I presume you want to get control of your server back long enough to save things and so on.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Samson   USA  (683 posts)  Bio
Date Reply #2 on Tue 13 Dec 2005 03:40 AM (UTC)
Message
Sort of a harsh way to do it, but I suppose that works. Personally I prefer using the alarm handlers in Smaug for this and setting game_loop up on a 30 second timer. I haven't run into much that requires game_loop to lock for that long so it's usually reasonable to assume it's stuck after that long.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


12,179 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.