version 1.19, 2005/09/26 10:54:46 |
version 1.19.10.1, 2008/03/23 00:40:25 |
|
|
.\" $NetBSD$ |
.\" ttyname.3,v 1.19 2005/09/26 10:54:46 wiz Exp |
.\" |
.\" |
.\" Copyright (c) 1991, 1993 |
.\" Copyright (c) 1991, 1993 |
.\" The Regents of the University of California. All rights reserved. |
.\" The Regents of the University of California. All rights reserved. |
|
|
.\" |
.\" |
.\" @(#)ttyname.3 8.1 (Berkeley) 6/4/93 |
.\" @(#)ttyname.3 8.1 (Berkeley) 6/4/93 |
.\" |
.\" |
.Dd September 25, 2005 |
.Dd January 30, 2008 |
.Dt TTYNAME 3 |
.Dt TTYNAME 3 |
.Os |
.Os |
.Sh NAME |
.Sh NAME |
|
|
This will return a consistent and unique number for each pseudo-terminal |
This will return a consistent and unique number for each pseudo-terminal |
device without requiring one to enumerate all of them in |
device without requiring one to enumerate all of them in |
.Xr ttys 5 . |
.Xr ttys 5 . |
|
.Sh IMPLEMENTATION NOTES |
|
As an optimisation, these functions attempt to obtain information about |
|
all devices from the |
|
.Pa /var/run/dev.db |
|
database, if it exists. |
|
If the database exists but is out of date, then these functions |
|
may produce incorrect results. |
|
The database should be updated using the |
|
.Xr dev_mkdb 8 |
|
command. |
.Sh RETURN VALUES |
.Sh RETURN VALUES |
The |
The |
.Fn ttyname |
.Fn ttyname |
Line 170 This can happen if the device node has b |
|
Line 180 This can happen if the device node has b |
|
.El |
.El |
.Sh SEE ALSO |
.Sh SEE ALSO |
.Xr ioctl 2 , |
.Xr ioctl 2 , |
.Xr ttys 5 |
.Xr ttys 5 , |
|
.Xr dev_mkdb 8 |
.Sh STANDARDS |
.Sh STANDARDS |
The |
The |
.Fn ttyname |
.Fn ttyname |
|
|
.Fn ttyslot |
.Fn ttyslot |
functions appeared in |
functions appeared in |
.At v7 . |
.At v7 . |
|
.\" Use of the .Pa /var/run/dev.db file was added in ???. |
.Sh BUGS |
.Sh BUGS |
The |
The |
.Fn ttyname |
.Fn ttyname |