OSDN Git Service

(split) LDP: Update original to LDP v3.40.
[linuxjm/LDP_man-pages.git] / original / man3 / posix_openpt.3
index 862d688..aa81d3c 100644 (file)
@@ -22,9 +22,9 @@
 .\" 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>
@@ -40,12 +40,12 @@ Feature Test Macro Requirements for glibc (see
 .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
@@ -76,13 +76,15 @@ Glibc support for
 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
@@ -94,6 +96,13 @@ posix_openpt(int flags)
 }
 .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),