OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man2 / dup.2
index 32566b5..e344b72 100644 (file)
@@ -34,7 +34,7 @@
 .\"     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
@@ -155,9 +155,14 @@ is set appropriately.
 .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
@@ -181,15 +186,20 @@ call was interrupted by a signal; see
 .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;
@@ -266,7 +276,7 @@ Instead, code something like the following could be used:
 .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,