From 65da520cfdd5cd32ad56100f3c88349708f40e6c Mon Sep 17 00:00:00 2001 From: Simon Schubert <2@0x2c.org> Date: Mon, 13 Dec 2010 00:51:19 +0100 Subject: [PATCH] errlog: preserve errno --- util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util.c b/util.c index 2f95b72..b32919d 100644 --- a/util.c +++ b/util.c @@ -145,6 +145,7 @@ errlog(int exitcode, const char *fmt, ...) va_end(ap); } + errno = oerrno; if (*outs != 0) { syslog(LOG_ERR, "%s: %m", outs); fprintf(stderr, "%s: %s: %s\n", getprogname(), outs, strerror(oerrno)); -- 2.47.3