int
posix_openpt(
int oflag
)
)
Searches for an unused master pseudo-terminal device, opens it, and returns
a file descriptor associated the now used pseudo-terminal device.
The
oflag
argument has the same meaning as in the
open(2)
call.
)
returns a non-negative integer, which corresponds to a file descriptor
pointing to the master pseudo-terminal device.
Otherwise, a value of -1 is returned and
errno
is set to indicate the error.
int
posix_openpt(int oflag) {
return open("/dev/ptmx", oflag);
}
)
function conforms to
IEEE Std 1003.1-2001 (``POSIX.1'') .