From 9f3d42791114c6544209d4084677886b82f165d2 Mon Sep 17 00:00:00 2001 From: guenther <> Date: Sun, 31 Aug 2014 01:42:36 +0000 Subject: [PATCH] Add additional kernel interfaces for setting close-on-exec on fds when creating them: pipe2(), dup3(), accept4(), MSG_CMSG_CLOEXEC, SOCK_CLOEXEC. Includes SOCK_NONBLOCK support. ok matthew@ --- src/include/unistd.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/include/unistd.h b/src/include/unistd.h index a2aab2d9..a8699876 100644 --- a/src/include/unistd.h +++ b/src/include/unistd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: unistd.h,v 1.89 2014/07/08 21:35:39 tedu Exp $ */ +/* $OpenBSD: unistd.h,v 1.90 2014/08/31 01:42:36 guenther Exp $ */ /* $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ */ /*- @@ -484,6 +484,11 @@ int symlinkat(const char *, int, const char *); int unlinkat(int, const char *, int); #endif +#if __BSD_VISIBLE +int dup3(int, int, int); +int pipe2(int [2], int); +#endif + #if __BSD_VISIBLE int acct(const char *); int closefrom(int);