diff options
Diffstat (limited to 'crawl-ref/source/libunix.cc')
-rw-r--r-- | crawl-ref/source/libunix.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crawl-ref/source/libunix.cc b/crawl-ref/source/libunix.cc index cd84a7a282..b79b7da691 100644 --- a/crawl-ref/source/libunix.cc +++ b/crawl-ref/source/libunix.cc @@ -51,6 +51,11 @@ #include "stuff.h" #include "view.h" +#ifdef DGL_ENABLE_CORE_DUMP +#include <sys/time.h> +#include <sys/resource.h> +#endif + #ifdef UNICODE_GLYPHS #include <wchar.h> #include <locale.h> @@ -447,6 +452,14 @@ void unixcurses_startup( void ) #endif +#ifdef DGL_ENABLE_CORE_DUMP + rlimit lim; + if (!getrlimit(RLIMIT_CORE, &lim)) { + lim.rlim_cur = RLIM_INFINITY; + setrlimit(RLIMIT_CORE, &lim); + } +#endif + initscr(); raw(); noecho(); |