diff options
author | 2014-08-31 02:21:18 +0000 | |
---|---|---|
committer | 2014-08-31 02:21:18 +0000 | |
commit | ed42a740c17f7bea88482a716bacbc46a06b7249 (patch) | |
tree | 41266fb76fcd0cc0229b872cae91df94a24ad430 /lib/libc/gen/posix_spawn_file_actions_addopen.3 | |
parent | regen (diff) | |
download | wireguard-openbsd-ed42a740c17f7bea88482a716bacbc46a06b7249.tar.xz wireguard-openbsd-ed42a740c17f7bea88482a716bacbc46a06b7249.zip |
Add additional userland interfaces for setting close-on-exec on fds
when creating them: mkostemp(), mkostemps(), the 'e' mode letter for
fopen(), freopen(), fdopen(), and popen(). The close-on-exec flag will
be cleared by the action created by posix_spawn_file_actions_adddup2().
Also, add support for the C11 'x' mode letter for fopen() and freopen(),
setting O_EXCL when possibly creating files.
Note: this requires kernel support for pipe2() and dup3()!
ok millert@
Diffstat (limited to 'lib/libc/gen/posix_spawn_file_actions_addopen.3')
-rw-r--r-- | lib/libc/gen/posix_spawn_file_actions_addopen.3 | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/libc/gen/posix_spawn_file_actions_addopen.3 b/lib/libc/gen/posix_spawn_file_actions_addopen.3 index 519a9a6f92f..b00ee325e8c 100644 --- a/lib/libc/gen/posix_spawn_file_actions_addopen.3 +++ b/lib/libc/gen/posix_spawn_file_actions_addopen.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: posix_spawn_file_actions_addopen.3,v 1.6 2013/07/16 15:21:11 schwarze Exp $ +.\" $OpenBSD: posix_spawn_file_actions_addopen.3,v 1.7 2014/08/31 02:21:18 guenther Exp $ .\" .\" Copyright (c) 2012 Marc Espie <espie@openbsd.org> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: July 16 2013 $ +.Dd $Mdocdate: August 31 2014 $ .Dt POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 3 .Os .Sh NAME @@ -61,6 +61,12 @@ dup2(fildes, newfildes); .Ed .Pp to be called. +In addition, the action will cause the close-on-exec flag to be cleared on +.Fa newfildes , +even if +.Fa newfildes +equals +.Fa fildes . .It The .Fn posix_spawn_file_actions_addopen |