]> granicus.if.org Git - pdns/commitdiff
rec: Check that the query distribution pipe has been set non-blocking
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 7 May 2018 12:57:47 +0000 (14:57 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 7 May 2018 12:57:47 +0000 (14:57 +0200)
pdns/pdns_recursor.cc

index 996c4c059355dde44170b067300de9c2d0390969..7f52becd3e5ae2ac192838ed29afeff24824d19c 100644 (file)
@@ -2415,7 +2415,10 @@ static void makeThreadPipes()
       unixDie("Creating pipe for inter-thread communications");
     tps.readQueriesToThread = fd[0];
     tps.writeQueriesToThread = fd[1];
-    setNonBlocking(tps.writeQueriesToThread);
+
+    if (!setNonBlocking(tps.writeQueriesToThread)) {
+      unixDie("Making pipe for inter-thread communications non-blocking");
+    }
 
     g_pipes.push_back(tps);
   }