.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
-.TH POSIX_OPENPT 3 2007-07-26 "" "Linux Programmer's Manual"
+.TH POSIX_OPENPT 3 2012-04-20 "" "Linux Programmer's Manual"
.SH NAME
-posix_openpt \- open a pseudo-terminal device
+posix_openpt \- open a pseudoterminal device
.SH SYNOPSIS
.nf
.B #include <stdlib.h>
.sp
.ad l
.BR posix_openpt ():
-_POSIX_C_SOURCE\ >=\ 200112L || _XOPEN_SOURCE\ >=\ 600
+_XOPEN_SOURCE\ >=\ 600
.ad b
.SH DESCRIPTION
The
.BR posix_openpt ()
-function opens an unused pseudo-terminal master device, returning a
+function opens an unused pseudoterminal master device, returning a
file descriptor that can be used to refer to that device.
The
has been provided since version 2.2.1.
.SH "CONFORMING TO"
.BR posix_openpt ()
-is part of the Unix98 pseudo-terminal support (see
+is part of the UNIX 98 pseudoterminal support (see
.BR pts (4)).
This function is specified in POSIX.1-2001.
.SH NOTES
-This function is a recent invention in POSIX.
-Some Unix implementations that support System V
-(aka Unix 98) pseudo-terminals don't have this function, but it
+The
+.BR posix_openpt ()
+function is a recent invention in POSIX.
+Some UNIX implementations that support System V
+(aka UNIX 98) pseudoterminals don't have this function, but it
is easy to implement:
.in +4n
.nf
}
.fi
.in
+.PP
+Calling
+.BR posix_openpt ()
+creates a pathname for the corresponding pseudoterminal slave device.
+The pathname of the slave device can be obtained using
+.BR ptsname (3).
+The slave device pathname exists only as long as the master device is open.
.SH "SEE ALSO"
.BR open (2),
.BR getpt (3),