summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2013-05-31 22:09:31 +0000
committerjilles <jilles@FreeBSD.org>2013-05-31 22:09:31 +0000
commit1bc49fde32f551f717c8b3f5da7815bfa10855cf (patch)
treea2ef1746cb671f243c18b4b1ed90e0a9fed19000 /lib
parent0c92a49de40eb4a387f5fe0a42ec9a7e6caaa1f9 (diff)
downloadFreeBSD-src-1bc49fde32f551f717c8b3f5da7815bfa10855cf.zip
FreeBSD-src-1bc49fde32f551f717c8b3f5da7815bfa10855cf.tar.gz
dup(2): Clarify return value, in particular of dup2().
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/dup.29
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libc/sys/dup.2 b/lib/libc/sys/dup.2
index 7b36d27..4254b9e 100644
--- a/lib/libc/sys/dup.2
+++ b/lib/libc/sys/dup.2
@@ -28,7 +28,7 @@
.\" @(#)dup.2 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd April 21, 2013
+.Dd June 1, 2013
.Dt DUP 2
.Os
.Sh NAME
@@ -113,10 +113,11 @@ is a valid descriptor, then
.Fn dup2
is successful, and does nothing.
.Sh RETURN VALUES
-The value -1 is returned if an error occurs in either call.
-The external variable
+These calls return the new file descriptor if successful;
+otherwise the value -1 is returned and
+the external variable
.Va errno
-indicates the cause of the error.
+is set to indicate the cause of the error.
.Sh ERRORS
The
.Fn dup
OpenPOWER on IntegriCloud