mirror of https://github.com/mkerrisk/man-pages
open.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
a39e673a89
commit
89de1a399e
|
@ -827,11 +827,11 @@ char path[PATH_MAX];
|
|||
fd = open("/path/to/dir", O_TMPFILE | O_RDWR,
|
||||
S_IRUSR | S_IWUSR);
|
||||
|
||||
/* File I/O on 'fd'... */
|
||||
/* File I/O on \(aqfd\(aq... */
|
||||
|
||||
linkat(fd, NULL, AT_FDCWD, "/path/for/file", AT_EMPTY_PATH);
|
||||
|
||||
/* If the caller doesn't have the CAP_DAC_READ_SEARCH
|
||||
/* If the caller doesn\(aqt have the CAP_DAC_READ_SEARCH
|
||||
capability (needed to use AT_EMPTY_PATH with linkat(2)),
|
||||
and there is a proc(5) filesystem mounted, then the
|
||||
linkat(2) call above can be replaced with:
|
||||
|
|
Loading…
Reference in New Issue