.\" details for dup2().
.\" 2008-10-09, mtk: add description of dup3()
.\"
-.TH DUP 2 2014-07-08 "Linux" "Linux Programmer's Manual"
+.TH DUP 2 2015-01-22 "Linux" "Linux Programmer's Manual"
.SH NAME
dup, dup2, dup3 \- duplicate a file descriptor
.SH SYNOPSIS
.TP
.B EBADF
.I oldfd
-isn't an open file descriptor, or
+isn't an open file descriptor.
+.TP
+.B EBADF
.I newfd
-is out of the allowed range for file descriptors.
+is out of the allowed range for file descriptors (see the discussion of
+.BR RLIMIT_NOFILE
+in
+.BR getrlimit (2)).
.TP
.B EBUSY
(Linux only) This may be returned by
.RB ( dup3 ())
.I flags
contain an invalid value.
+.TP
+.B EINVAL
+.RB ( dup3 ())
.\" FIXME . To confirm with Al Viro that this was intended, and its rationale
-Or,
.I oldfd
was equal to
.IR newfd .
.TP
.B EMFILE
The process already has the maximum number of file
-descriptors open and tried to open a new one.
+descriptors open and tried to open a new one (see the discussion of
+.BR RLIMIT_NOFILE
+in
+.BR getrlimit (2)).
.SH VERSIONS
.BR dup3 ()
was added to Linux in version 2.6.27;
.BR fcntl (2),
.BR open (2)
.SH COLOPHON
-This page is part of release 3.77 of the Linux
+This page is part of release 3.79 of the Linux
.I man-pages
project.
A description of the project,