mirror of https://github.com/mkerrisk/man-pages
open.2: Note some further advantages of the *at() APIs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
70376041ca
commit
941d289252
12
man2/open.2
12
man2/open.2
|
@ -1454,7 +1454,17 @@ argument of (say)
|
|||
.BR fstatat (2)
|
||||
and
|
||||
.BR openat ().
|
||||
|
||||
The use of the
|
||||
.I dirfd
|
||||
file descriptor also has other benefits:
|
||||
.IP * 3
|
||||
the file descriptor is a stable reference to the directory,
|
||||
even if the directory is renamed; and
|
||||
.IP *
|
||||
the open file descriptor prevents the underlying filesystem from
|
||||
being dismounted,
|
||||
just as when a process has a current working directory on a filesystem.
|
||||
.PP
|
||||
Second,
|
||||
.BR openat ()
|
||||
allows the implementation of a per-thread "current working
|
||||
|
|
Loading…
Reference in New Issue