diff options
author | 2011-07-12 18:36:23 +0000 | |
---|---|---|
committer | 2011-07-12 18:36:23 +0000 | |
commit | 533cfcdb5ffbd80d6bbcb2fd44519e6690677be4 (patch) | |
tree | f5e22f290762edbc97a72fbab8d905aef4d1cdd2 /lib/libc/sys | |
parent | break up a line of code that involved a decrement operator and macros (diff) | |
download | wireguard-openbsd-533cfcdb5ffbd80d6bbcb2fd44519e6690677be4.tar.xz wireguard-openbsd-533cfcdb5ffbd80d6bbcb2fd44519e6690677be4.zip |
document O_CLOEXEC and O_DIRECTORY
Diffstat (limited to 'lib/libc/sys')
-rw-r--r-- | lib/libc/sys/open.2 | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/libc/sys/open.2 b/lib/libc/sys/open.2 index 2190c88295d..b61e84773fb 100644 --- a/lib/libc/sys/open.2 +++ b/lib/libc/sys/open.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: open.2,v 1.36 2011/02/18 13:22:53 millert Exp $ +.\" $OpenBSD: open.2,v 1.37 2011/07/12 18:36:23 matthew Exp $ .\" $NetBSD: open.2,v 1.8 1995/02/27 12:35:14 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" -.Dd $Mdocdate: February 18 2011 $ +.Dd $Mdocdate: July 12 2011 $ .Dt OPEN 2 .Os .Sh NAME @@ -64,7 +64,7 @@ The flags specified are formed by .Tn OR Ns 'ing the following values: .Pp -.Bl -tag -width O_NONBLOCK -offset indent -compact +.Bl -tag -width O_DIRECTORY -offset indent -compact .It Dv O_RDONLY Open for reading only. .It Dv O_WRONLY @@ -89,6 +89,12 @@ Atomically obtain a shared lock. Atomically obtain an exclusive lock. .It Dv O_NOFOLLOW If last path element is a symlink, don't follow it. +.It Dv O_CLOEXEC +Set FD_CLOEXEC on the new file descriptor. +.It Dv O_DIRECTORY +Error if +.Fa path +does not name a directory. .El .Pp Opening a file with @@ -185,6 +191,11 @@ The named file is opened unless: .Bl -tag -width Er .It Bq Er ENOTDIR A component of the path prefix is not a directory. +.It Bq Er ENOTDIR +.Dv O_DIRECTORY +is specified and +.Fa path +does not name a directory. .It Bq Er ENAMETOOLONG A component of a pathname exceeded .Dv {NAME_MAX} |