From ec5e0f421c88e8f2194e0de0a00ce82018ecfa2c Mon Sep 17 00:00:00 2001 From: "Yuriy M. Kaminskiy" Date: Wed, 3 Dec 2014 12:18:10 +0300 Subject: [PATCH] src/log.c: Fix unexpected termination in logprintf (tiny change) When errno was set to EPIPE before call to logprintf (e.g. during close of SSL connection that was reset by peer), it will unexpectedly terminate wget. It should exit only when EPIPE was triggered by logging code. Regression by 0b5b100fc9aaa54257ffa16a083a862c031c335b --- src/log.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/log.c b/src/log.c index d47c4220..72f91bab 100644 --- a/src/log.c +++ b/src/log.c @@ -536,6 +536,7 @@ logprintf (enum log_options o, const char *fmt, ...) CHECK_VERBOSE (o); xzero (lpstate); + errno = 0; do { va_start (args, fmt);