Query: posix_openpt
OS: netbsd
Section: 3
Links: netbsd man pages all man pages
Forums: unix linux community forum categories
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
POSIX_OPENPT(3) BSD Library Functions Manual POSIX_OPENPT(3)NAMEposix_openpt -- open a pseudo-terminal deviceLIBRARYStandard C Library (libc, -lc)SYNOPSIS#include <stdlib.h> #include <fcntl.h> int posix_openpt(int oflag);DESCRIPTIONThe posix_openpt() function searches for an unused master pseudo-terminal device, opens it, and returns a file descriptor associated with the now used pseudo-terminal device. The oflag argument has the same meaning as in the open(2) call.RETURN VALUESIf successful, posix_openpt() 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.SEE ALSOioctl(2), open(2), grantpt(3), ptsname(3), unlockpt(3)RATIONALEThe standards committee did not want to directly expose the cloning device, thus decided to wrap the functionality in this function. The equivalent code would be: int posix_openpt(int oflag) { return open("/dev/ptmx", oflag); }STANDARDSThe posix_openpt() function conforms to IEEE Std 1003.1-2001 (``POSIX.1'').BSDMay 25, 2004 BSD
Related Man Pages |
---|
grantpt(3) - mojave |
posix_openpt(3) - netbsd |
posix_openpt(3c) - sunos |
ptsname(3) - osx |
unlockpt(3) - osx |
Similar Topics in the Unix Linux Community |
---|
How to open a file in TextEdit |