|
@@ -4,6 +4,9 @@
|
|
|
#include "orconfig.h"
|
|
|
#include <stdio.h>
|
|
|
#include <stdlib.h>
|
|
|
+#ifdef HAVE_SYS_RESOURCE_H
|
|
|
+#include <sys/resource.h>
|
|
|
+#endif
|
|
|
|
|
|
|
|
|
#undef TOR_COVERAGE
|
|
@@ -88,6 +91,11 @@ main(int argc, char **argv)
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
+#ifdef HAVE_SYS_RESOURCE_H
|
|
|
+ struct rlimit rlim = { .rlim_cur = 0, .rlim_max = 0 };
|
|
|
+ setrlimit(RLIMIT_CORE, &rlim);
|
|
|
+#endif
|
|
|
+
|
|
|
#if !(defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && \
|
|
|
defined(HAVE_BACKTRACE_SYMBOLS_FD) && defined(HAVE_SIGACTION))
|
|
|
puts("Backtrace reporting is not supported on this platform");
|