From 014019e98da7fa0f7476bea5b6f3c84dafe7558a Mon Sep 17 00:00:00 2001 From: Craig Barnes Date: Wed, 5 Aug 2020 20:11:51 +0100 Subject: xmalloc: log error to syslog() in fatal_error() function --- xmalloc.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xmalloc.c') diff --git a/xmalloc.c b/xmalloc.c index aecb5787..7322953a 100644 --- a/xmalloc.c +++ b/xmalloc.c @@ -2,11 +2,14 @@ #include #include #include +#include +#include #include "xmalloc.h" static NORETURN COLD void fatal_error(const char *msg, int err) { + syslog(LOG_ERR, "%s: %s", msg, strerror(err)); errno = err; perror(msg); abort(); -- cgit v1.3