diff options
author | 1998-06-08 17:21:45 +0000 | |
---|---|---|
committer | 1998-06-08 17:21:45 +0000 | |
commit | 637c126b93cd69c58cb695ec8393f0cf371d59e1 (patch) | |
tree | f4d39ed165cd032e32c2c03a62931ead61bef434 /lib | |
parent | do not needlessly uppercase function names (diff) | |
download | wireguard-openbsd-637c126b93cd69c58cb695ec8393f0cf371d59e1.tar.xz wireguard-openbsd-637c126b93cd69c58cb695ec8393f0cf371d59e1.zip |
finish; kleink
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/ttyname.3 | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/lib/libc/gen/ttyname.3 b/lib/libc/gen/ttyname.3 index 97b126bc44f..76830b638d2 100644 --- a/lib/libc/gen/ttyname.3 +++ b/lib/libc/gen/ttyname.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ttyname.3,v 1.3 1997/09/01 17:35:09 deraadt Exp $ +.\" $OpenBSD: ttyname.3,v 1.4 1998/06/08 17:21:45 deraadt Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -93,13 +93,39 @@ returns the null terminated name if the device is found and is true; otherwise a .Dv NULL -pointer is returned. +pointer is returned and +.Dv errno +is set to indicate the error. +.Pp +The +.Fn isatty +function returns 1 if +.Fa fd +is associated with a terminal device; otherwise it returns 0 and +.Dv errno +is set to indicate the error. .Pp The .Fn ttyslot function returns the unit number of the device file if found; otherwise the value zero is returned. +.Sh ERRORS +The +.Fn ttyname +and +.Fn isatty +functions will fail if: +.Bl -tag -width Er +.It Bq Er EBADF +The +.Fa fd +argument is not a valid file descriptor. +.It Bq Er ENOTTY +The +.Fa fd +argument does not refer to a terminal device. +.El .Sh FILES .Bl -tag -width /etc/ttys -compact .It Pa /dev/\(** |