]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daemon: fix a typo in SIGPIPE blocking
authorVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 14 Nov 2017 13:18:43 +0000 (14:18 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 20 Nov 2017 13:09:10 +0000 (14:09 +0100)
I'm sorry. Buggy commit: 2ba2a5e8

daemon/main.c

index f70c441f2202b14741f785156b438a829c113526..276f0fb7f40296f7e00c4c784edb754cf3630475 100644 (file)
@@ -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;