lib: Add xpipe_nonblocking helper
[sliver-openvswitch.git] / lib / socket-util.c
index e32c03d..f8b44cc 100644 (file)
@@ -893,6 +893,14 @@ xpipe(int fds[2])
     }
 }
 
+void
+xpipe_nonblocking(int fds[2])
+{
+    xpipe(fds);
+    xset_nonblocking(fds[0]);
+    xset_nonblocking(fds[1]);
+}
+
 void
 xsocketpair(int domain, int type, int protocol, int fds[2])
 {