.\" SUCH DAMAGE.
.\"
.\" @(#)ctermid.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/gen/ctermid.3,v 1.12 2007/01/09 00:27:53 imp Exp $
+.\" $FreeBSD$
.\"
-.Dd June 4, 1993
+.Dd October 1, 2011
.Dt CTERMID 3
.Os
.Sh NAME
-.Nm ctermid
+.Nm ctermid ,
+.Nm ctermid_r
.Nd generate terminal pathname
.Sh LIBRARY
.Lb libc
The current implementation simply returns
.Ql /dev/tty .
.Sh RETURN VALUES
-Upon successful completion, a
-.Pf non- Dv NULL
-pointer is returned.
-Otherwise, a
-.Dv NULL
-pointer is returned and the global variable
-.Va errno
-is set to indicate the error.
+The
+.Fn ctermid
+function returns
+.Fa buf
+if it is
+.Pf non- Dv NULL ,
+otherwise it returns the address of a static buffer.
+The
+.Fn ctermid_r
+function always returns
+.Fa buf ,
+even if it is the NULL pointer.
.Sh ERRORS
The current implementation detects no error conditions.
.Sh SEE ALSO