From 622bcf9d46a763b7aaba75fa8421533bcbe4b981 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 12 Nov 2017 13:11:58 -0500 Subject: exec: Recover from E2BIG --- util.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'util.h') diff --git a/util.h b/util.h index 50f476e..efeea19 100644 --- a/util.h +++ b/util.h @@ -106,6 +106,15 @@ int redirect(int fd, const char *path, int flags, ...); */ int dup_cloexec(int fd); +/** + * Like pipe(), but set the FD_CLOEXEC flag. + * + * @param pipefd + * The array to hold the two file descriptors. + * @return 0 on success, -1 on failure. + */ +int pipe_cloexec(int pipefd[2]); + /** * Dynamically allocate a regex error message. * -- cgit v1.2.3