dup(2): Clarify return value, in particular of dup2().

This commit is contained in:
Jilles Tjoelker 2013-05-31 22:09:31 +00:00
parent 1f4e9654bd
commit 4b08438c22
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=251203

View File

@ -28,7 +28,7 @@
.\" @(#)dup.2 8.1 (Berkeley) 6/4/93 .\" @(#)dup.2 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
.Dd April 21, 2013 .Dd June 1, 2013
.Dt DUP 2 .Dt DUP 2
.Os .Os
.Sh NAME .Sh NAME
@ -113,10 +113,11 @@ is a valid descriptor, then
.Fn dup2 .Fn dup2
is successful, and does nothing. is successful, and does nothing.
.Sh RETURN VALUES .Sh RETURN VALUES
The value -1 is returned if an error occurs in either call. These calls return the new file descriptor if successful;
The external variable otherwise the value -1 is returned and
the external variable
.Va errno .Va errno
indicates the cause of the error. is set to indicate the cause of the error.
.Sh ERRORS .Sh ERRORS
The The
.Fn dup .Fn dup