From 3d2a9d35450876fe28708340e2b4ed3831d9d9af Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 10 Nov 2009 16:53:20 +0100 Subject: fd_util: added function pipe_cloexec() Same as pipe_cloexec_nonblock(), but doesn't set non-blocking mode. --- src/fd_util.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/fd_util.h') diff --git a/src/fd_util.h b/src/fd_util.h index 68a7d86a..8b94a3a2 100644 --- a/src/fd_util.h +++ b/src/fd_util.h @@ -55,6 +55,13 @@ open_cloexec(const char *path_fs, int flags); int creat_cloexec(const char *path_fs, int mode); +/** + * Wrapper for pipe(), which sets the CLOEXEC flag (atomically if + * supported by the OS). + */ +int +pipe_cloexec(int fd[2]); + /** * Wrapper for pipe(), which sets the CLOEXEC flag (atomically if * supported by the OS). -- cgit v1.2.3