summaryrefslogtreecommitdiffstats
path: root/man2/dup.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/dup.2')
-rw-r--r--man2/dup.228
1 files changed, 14 insertions, 14 deletions
diff --git a/man2/dup.2 b/man2/dup.2
index 4948e6dd4..eb57683fb 100644
--- a/man2/dup.2
+++ b/man2/dup.2
@@ -40,7 +40,7 @@ system call allocates a new file descriptor that refers to the same
open file description as the descriptor
.IR oldfd .
(For an explanation of open file descriptions, see
-.BR open (2).)
+.MR open 2 .)
The new file descriptor number is guaranteed to be the lowest-numbered
file descriptor that was unused in the calling process.
.P
@@ -49,7 +49,7 @@ the old and new file descriptors may be used interchangeably.
Since the two file descriptors refer to the same open file description,
they share file offset and file status flags;
for example, if the file offset is modified by using
-.BR lseek (2)
+.MR lseek 2
on one of the file descriptors,
the offset is also changed for the other file descriptor.
.P
@@ -58,7 +58,7 @@ The two file descriptors do not share file descriptor flags
The close-on-exec flag
.RB ( FD_CLOEXEC ;
see
-.BR fcntl (2))
+.MR fcntl 2 )
for the duplicate descriptor is off.
.\"
.SS dup2()
@@ -87,7 +87,7 @@ The steps of closing and reusing the file descriptor
are performed
.IR atomically .
This is important, because trying to implement equivalent functionality using
-.BR close (2)
+.MR close 2
and
.BR dup ()
would be
@@ -129,7 +129,7 @@ for the new file descriptor by specifying
in
.IR flags .
See the description of the same flag in
-.BR open (2)
+.MR open 2
for reasons why this may be useful.
.IP \[bu]
.\" Ulrich Drepper, LKML, 2008-10-09:
@@ -160,7 +160,7 @@ isn't an open file descriptor.
is out of the allowed range for file descriptors (see the discussion of
.B RLIMIT_NOFILE
in
-.BR getrlimit (2)).
+.MR getrlimit 2 ).
.TP
.B EBUSY
(Linux only) This may be returned by
@@ -168,7 +168,7 @@ in
or
.BR dup3 ()
during a race condition with
-.BR open (2)
+.MR open 2
and
.BR dup ().
.TP
@@ -178,7 +178,7 @@ The
or
.BR dup3 ()
call was interrupted by a signal; see
-.BR signal (7).
+.MR signal 7 .
.TP
.B EINVAL
.RB ( dup3 ())
@@ -196,7 +196,7 @@ The per-process limit on the number of open file descriptors has been reached
(see the discussion of
.B RLIMIT_NOFILE
in
-.BR getrlimit (2)).
+.MR getrlimit 2 ).
.SH STANDARDS
.TP
.BR dup ()
@@ -237,7 +237,7 @@ like
If
.I newfd
was open, any errors that would have been reported at
-.BR close (2)
+.MR close 2
time are lost.
If this is of concern,
then\[em]unless the program is single-threaded and does not allocate
@@ -278,7 +278,7 @@ if (tmpfd != \-1) {
.EE
.in
.SH SEE ALSO
-.BR close (2),
-.BR fcntl (2),
-.BR open (2),
-.BR pidfd_getfd (2)
+.MR close 2 ,
+.MR fcntl 2 ,
+.MR open 2 ,
+.MR pidfd_getfd 2