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?
Bad idea to break out of an infinite loop?
Posted by Zeno on Mon 12 Dec 2005 07:50 PM — 3 posts, 14,131 views.
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.
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.
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.