From: Vladimír Čunát Date: Tue, 14 Nov 2017 13:18:43 +0000 (+0100) Subject: daemon: fix a typo in SIGPIPE blocking X-Git-Tag: v1.5.1~20^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8a347939ed3934ae253e719659ed17b9cd6fbf9;p=thirdparty%2Fknot-resolver.git daemon: fix a typo in SIGPIPE blocking I'm sorry. Buggy commit: 2ba2a5e8 --- diff --git a/daemon/main.c b/daemon/main.c index f70c441f2..276f0fb7f 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -643,7 +643,7 @@ int main(int argc, char **argv) /* Workaround for https://github.com/libuv/libuv/issues/45 * (Write after ECONNRESET crash.) */ - if (ret && signal(SIGPIPE, SIG_IGN) == SIG_ERR) { + if (ret == 0 && signal(SIGPIPE, SIG_IGN) == SIG_ERR) { kr_log_error("[system] can't block SIGPIPE signal: %s\n", strerror(errno)); ret = EXIT_FAILURE;