posix_openpt() — open a pseudo-terminal master device
int posix_openpt(int oflag);
indicates the file status flags and file access modes of the open file
description. Values for
are constructed by a bitwise-inclusive OR
of flags from the following list,
Open for reading and writing.
will not cause the terminal device to become the
controlling terminal for the process.
function establishes a connection between a master device for a
pseudo-terminal and a file descriptor. This file descriptor can
be used to refer that device.
The file status flags and file access modes of the opened file
descriptor will be set according to the value of
Upon successful completion
opens a master
pseudo-terminal device and returns a non-negative integer representing
the lowest numbered unused file descriptor. Otherwise,
returns -1 and
is set to indicate the error.
sets one of the following values for
file descriptors are currently open in the calling process.
The maximum allowable number of files are currently open on the system.
The value of
is not valid.
Out of pseudo-terminal resources.
Out of STREAMS resources.
was developed by HP.