aboutsummaryrefslogtreecommitdiffstats
path: root/src/fd_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fd_util.h')
-rw-r--r--src/fd_util.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/fd_util.h b/src/fd_util.h
index b704d3d2e..b49a51373 100644
--- a/src/fd_util.h
+++ b/src/fd_util.h
@@ -65,6 +65,17 @@ pipe_cloexec(int fd[2]);
int
pipe_cloexec_nonblock(int fd[2]);
+#ifndef WIN32
+
+/**
+ * Wrapper for socketpair(), which sets the CLOEXEC flag (atomically
+ * if supported by the OS).
+ */
+int
+socketpair_cloexec(int domain, int type, int protocol, int sv[2]);
+
+#endif
+
/**
* Wrapper for socket(), which sets the CLOEXEC and the NONBLOCK flag
* (atomically if supported by the OS).