|
Bad idea to break out of an infinite loop?
|
Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Zeno
USA (2,867 posts) bio
Moderator |
| Date |
Mon 12 Dec 2005 07:50 PM (UTC) [ quote
] |
| 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 (18,772 posts) bio
Forum Administrator |
| Date |
Reply #1 on Mon 12 Dec 2005 07:54 PM (UTC) [ quote
] |
| 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) [ quote
] |
| 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. |
SmaugMuds.org: http://www.smaugmuds.org - The Smaug MUDs Community Center
"The past was erased, the erasure was forgotten, the lie became truth." -- George Orwell, 1984 | 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.
1,578 views.
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )