diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2014-01-21 10:23:26 +0100 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2014-01-24 11:44:57 +0100 |
| commit | 0fb83d005284807d26aab5e4aba2bf0b8764102a (patch) | |
| tree | 83eac0d4443df8aa46c3bb283d621d34ea7756f7 /man2 | |
| parent | f869dc0479d62c73cd1597b480560f690a39a952 (diff) | |
| download | man-pages-0fb83d005284807d26aab5e4aba2bf0b8764102a.tar.gz | |
open.2: grfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man2')
| -rw-r--r-- | man2/open.2 | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/man2/open.2 b/man2/open.2 index d634ad3b10..8a9f0b7862 100644 --- a/man2/open.2 +++ b/man2/open.2 @@ -216,7 +216,7 @@ of the process. The group ownership (group ID) is set either to the effective group ID of the process or to the group ID of the parent directory (depending on filesystem type and mount options, -and the mode of the parent directory, see the mount options +and the mode of the parent directory; see the mount options .I bsdgroups and .I sysvgroups @@ -578,11 +578,13 @@ permanent, using code like the following: .nf char path[PATH_MAX]; fd = open("/path/to/dir", O_TMPFILE | O_RDWR, - S_IRUSR | S_IWUSR); + S_IRUSR | S_IWUSR); + /* File I/O on 'fd'... */ + snprintf(path, PATH_MAX, "/proc/self/fd/%d", fd); linkat(AT_FDCWD, path, AT_FDCWD, argv[2], - AT_SYMLINK_FOLLOW); + AT_SYMLINK_FOLLOW); .fi .in |
