diff dbutil.c @ 425:1afa503e33f5

Disable core dumps
author Matt Johnston <matt@ucc.asn.au>
date Mon, 12 Feb 2007 10:43:44 +0000
parents b895f91c2ee6
children c216212001fc
line wrap: on
line diff
--- a/dbutil.c	Sun Feb 11 10:46:44 2007 +0000
+++ b/dbutil.c	Mon Feb 12 10:43:44 2007 +0000
@@ -693,3 +693,9 @@
 	}
 	TRACE(("leave setnonblocking"))
 }
+
+void disallow_core() {
+	struct rlimit lim;
+	lim.rlim_cur = lim.rlim_max = 0;
+	setrlimit(RLIMIT_CORE, &lim);
+}