aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man2/open.28
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