--- src/lib/libc/gen/ttyname.3 2003/06/17 04:26:42 1.2 +++ src/lib/libc/gen/ttyname.3 2005/11/19 22:32:53 1.3 @@ -31,7 +31,7 @@ .\" .\" @(#)ttyname.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD: src/lib/libc/gen/ttyname.3,v 1.5.2.3 2001/12/14 18:33:51 ru Exp $ -.\" $DragonFly: src/lib/libc/gen/ttyname.3,v 1.1 2003/06/16 04:25:56 dillon Exp $ +.\" $DragonFly$ .\" .Dd June 4, 1993 .Dt TTYNAME 3 @@ -47,6 +47,8 @@ .In unistd.h .Ft char * .Fn ttyname "int fd" +.Ft char * +.Fn ttyname_r "int fd" "char *buf" "size_t len" .Ft int .Fn isatty "int fd" .Ft int @@ -84,6 +86,11 @@ a file descriptor for which is true .Pp The +.Fn ttyname_r +function is a thread-safe version of +.Fn ttyname +.Pp +The .Fn ttyslot function fetches the current process' control terminal number from the