summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorjmc <jmc@openbsd.org>2007-07-03 14:45:34 +0000
committerjmc <jmc@openbsd.org>2007-07-03 14:45:34 +0000
commit5326a4893a5332577c8752afffe78719ca564b34 (patch)
treebcd3574911bedc0bce066c83698dbeb524c65f73 /lib/libc
parentRework the way opencvs works in relation to files in the Attic/: (diff)
downloadwireguard-openbsd-5326a4893a5332577c8752afffe78719ca564b34.tar.xz
wireguard-openbsd-5326a4893a5332577c8752afffe78719ca564b34.zip
from Nicholas Marriott:
ttyname_r returns an error number, rather than setting errno. ok millert
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/ttyname.315
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/libc/gen/ttyname.3 b/lib/libc/gen/ttyname.3
index 0b882c38015..420fa423d7d 100644
--- a/lib/libc/gen/ttyname.3
+++ b/lib/libc/gen/ttyname.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ttyname.3,v 1.16 2007/05/31 19:19:29 jmc Exp $
+.\" $OpenBSD: ttyname.3,v 1.17 2007/07/03 14:45:34 jmc Exp $
.\"
.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: July 3 2007 $
.Dt TTYNAME 3
.Os
.Sh NAME
@@ -99,9 +99,7 @@ file entry.
.Sh RETURN VALUES
The
.Fn ttyname
-and
-.Fn ttyname_r
-functions return the NUL-terminated name if the device is found and
+function returns the NUL-terminated name if the device is found and
.Fn isatty
is true; otherwise
a null pointer is returned and
@@ -109,6 +107,10 @@ a null pointer is returned and
is set to indicate the error.
.Pp
The
+.Fn ttyname_r
+function returns zero if successful; otherwise an error number is returned.
+.Pp
+The
.Fn isatty
function returns 1 if
.Fa fd
@@ -127,7 +129,8 @@ the value zero is returned.
.El
.Sh ERRORS
The
-.Fn ttyname
+.Fn ttyname ,
+.Fn ttyname_r ,
and
.Fn isatty
functions will fail if: