summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/crash.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-10-03 13:48:04 +0200
committerAdam Borowski <kilobyte@angband.pl>2013-10-03 16:53:28 +0200
commit52d390ae806240e7c68f51057e63747aedb0f157 (patch)
treec2f59393e69db8f63475cd1e76cc1ac71394b7dd /crawl-ref/source/crash.cc
parent2dca142417c7838dd09c71aa12c63302fa0c7db3 (diff)
downloadcrawl-ref-52d390ae806240e7c68f51057e63747aedb0f157.tar.gz
crawl-ref-52d390ae806240e7c68f51057e63747aedb0f157.zip
Don't waste electricity for mapstat infinite loops.
A hard limit of 60 seconds of CPU time per level.
Diffstat (limited to 'crawl-ref/source/crash.cc')
-rw-r--r--crawl-ref/source/crash.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/crawl-ref/source/crash.cc b/crawl-ref/source/crash.cc
index 40b856d462..d5cf480ffc 100644
--- a/crawl-ref/source/crash.cc
+++ b/crawl-ref/source/crash.cc
@@ -148,7 +148,7 @@ static void _crash_signal_handler(int sig_num)
tiles.shutdown();
#endif
-#ifdef DGAMELAUNCH
+#ifdef WATCHDOG
/* Infinite loop protection.
Not tickling the watchdog for 60 seconds of user CPU time (not wall
@@ -367,7 +367,6 @@ void disable_other_crashes()
#endif
}
-#ifdef DGAMELAUNCH
void watchdog()
{
struct itimerval t;
@@ -377,4 +376,3 @@ void watchdog()
t.it_value.tv_usec = 0;
setitimer(ITIMER_VIRTUAL, &t, 0);
}
-#endif