aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-10-16 14:23:39 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-10-16 14:23:39 +0100
commitd46976e9fba2e81d5f59f008c8bc8b041aed4f55 (patch)
tree249ed0d57a6fd678231d683aab5783a6a211bed2 /src
parent87f4dd3154e84586ca0541481c45b8d9edd1e865 (diff)
downloadrspamd-d46976e9fba2e81d5f59f008c8bc8b041aed4f55.tar.gz
rspamd-d46976e9fba2e81d5f59f008c8bc8b041aed4f55.zip
[Minor] Fix build
Diffstat (limited to 'src')
-rw-r--r--src/rspamd.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/rspamd.c b/src/rspamd.c
index 4cf9ff287..09523b90c 100644
--- a/src/rspamd.c
+++ b/src/rspamd.c
@@ -43,6 +43,9 @@
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
+#ifdef HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
#ifdef HAVE_LIBUTIL_H
#include <libutil.h>
#endif
@@ -1028,6 +1031,7 @@ rspamd_cld_handler (gint signo, short what, gpointer arg)
g_strsignal (WTERMSIG (res)));
}
else {
+#ifdef HAVE_SYS_RESOURCE_H
struct rlimit rlmt;
(void)getrlimit (RLIMIT_CORE, &rlmt);
@@ -1041,6 +1045,15 @@ rspamd_cld_handler (gint signo, short what, gpointer arg)
cur->cores_throttled ? "yes" : "no",
(gint64)rlmt.rlim_cur,
(gint64)rlmt.rlim_max);
+#else
+ msg_warn_main (
+ "%s process %P terminated abnormally by signal: %s"
+ " but NOT created core file (throttled=%s); ",
+ g_quark_to_string (cur->type),
+ cur->pid,
+ g_strsignal (WTERMSIG (res)),
+ cur->cores_throttled ? "yes" : "no");
+#endif
}
#else
msg_warn_main (