Query: posix_openpt
OS: hpux
Section: 3c
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
posix_openpt(3C) posix_openpt(3C)NAMEposix_openpt() - open a pseudo-terminal master deviceSYNOPSISParameters oflag indicates the file status flags and file access modes of the open file description. Values for oflag are constructed by a bit- wise-inclusive OR of flags from the following list, defined in Open for reading and writing. If set will not cause the terminal device to become the controlling terminal for the process.DESCRIPTIONThe 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 oflag.RETURN VALUEUpon 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.ERRORSOn failure sets one of the following values for OPEN_MAX file descriptors are currently open in the calling process. The maximum allowable number of files are currently open on the system. The value of oflag is not valid. Out of pseudo-terminal resources. Out of STREAMS resources.AUTHORwas developed by HP.SEE ALSOopen(2), grantpt(3C), ptsname(3C), unlockpt(3C), ptm(7), pts(7). posix_openpt(3C)