mirror of https://github.com/mkerrisk/man-pages
open.2: Explicitly describe the EBADF error that can occur with openat()
In particular, specifying an invalid file descriptor number in 'dirfd' can be used as a check that 'pathname' is absolute. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
a9db6c1ba3
commit
73434f4003
13
man2/open.2
13
man2/open.2
|
@ -966,6 +966,19 @@ must be a directory that was opened for reading
|
|||
or using the
|
||||
.B O_PATH
|
||||
flag.
|
||||
.PP
|
||||
If the pathname given in
|
||||
.I pathname
|
||||
is relative, and
|
||||
.I dirfd
|
||||
is not a valid file descriptor, an error
|
||||
.RB ( EBADF )
|
||||
results.
|
||||
(Specifying an invalid file descriptor number in
|
||||
.I dirfd
|
||||
can be used as a means to ensure that
|
||||
.I pathname
|
||||
is absolute.)
|
||||
.\"
|
||||
.SS openat2(2)
|
||||
The
|
||||
|
|
Loading…
Reference in New Issue