*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: posix_openpt | Section: 3 | Source: OpenBSD | File: posix_openpt.3
POSIX_OPENPT(3) FreeBSD Library Functions Manual POSIX_OPENPT(3) NAME posix_openpt - open a pseudo-terminal device SYNOPSIS #include <stdlib.h> #include <fcntl.h> int posix_openpt(int oflag); DESCRIPTION The posix_openpt() function finds the next available pseudo-terminal and returns an open file descriptor for its master device. The path name of the slave device may be determined via the ptsname() function. Note that the unlockpt() and grantpt() functions should be called before opening the slave device. The oflag argument is formed by bitwise-inclusive OR'ing the following values defined in <fcntl.h>: O_RDWR Open for reading and writing. O_NOCTTY Prevent the device from being made the controlling terminal for the session. This flag has no effect on OpenBSD and is included for compatibility with other systems. The O_RDWR flag must be specified in oflag. If oflag contains values other than those listed above, posix_openpt() will return an error. RETURN VALUES If successful, posix_openpt() returns a non-negative integer, the file descriptor for the pseudo-terminal master device. Otherwise, a value of -1 is returned and errno is set to indicate the error. ERRORS The posix_openpt() function will fail if: [EMFILE] The per-process descriptor table is full. [ENFILE] The system file table is full. [EINVAL] The value of oflag is not valid. SEE ALSO ptsname(3), pty(4), tty(4) STANDARDS The posix_openpt() function conforms to IEEE Std 1003.1-2001 ("POSIX.1"). HISTORY The posix_openpt() function appeared in OpenBSD 5.3. FreeBSD 14.1-RELEASE-p8 January 25, 2019 FreeBSD 14.1-RELEASE-p8

Navigation Options