[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-wget] [resent][PATCH] Fix unexpected termination in logprintf

From: Yuriy M. Kaminskiy
Subject: [Bug-wget] [resent][PATCH] Fix unexpected termination in logprintf
Date: Fri, 05 Dec 2014 17:23:51 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

>From b85ede33fc72fa81ebfbd9f4d75fb65dc72e2fc5 Mon Sep 17 00:00:00 2001
From: "Yuriy M. Kaminskiy" <address@hidden>
Date: Wed, 3 Dec 2014 12:18:10 +0300
Subject: [PATCH] Fix unexpected termination in logprintf

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 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/log.c b/src/log.c
index d47c422..72f91ba 100644
--- a/src/log.c
+++ b/src/log.c
@@ -536,6 +536,7 @@ logprintf (enum log_options o, const char *fmt, ...)
   xzero (lpstate);
+  errno = 0;
       va_start (args, fmt);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]