diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-07 22:37:27 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-07 22:37:27 +0100 |
commit | d34ad44f90fbfc9f4166d8326994aa86458a18d5 (patch) | |
tree | 0b0fc187597707ce26d5b42176628d8a0ae687bd /Base | |
parent | d217d3ff6fddf1b8dec4345a8d233725201e14af (diff) | |
download | serenity-d34ad44f90fbfc9f4166d8326994aa86458a18d5.zip |
Base: Add man page for posix_openpt(3)
Diffstat (limited to 'Base')
-rw-r--r-- | Base/usr/share/man/man3/posix_openpt.md | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Base/usr/share/man/man3/posix_openpt.md b/Base/usr/share/man/man3/posix_openpt.md new file mode 100644 index 0000000000..66795aa262 --- /dev/null +++ b/Base/usr/share/man/man3/posix_openpt.md @@ -0,0 +1,34 @@ +## Name + +posix\_openpt - open a pseudo-terminal device + +## Synopsis + +```**c++ +#include <stdlib.h> +#include <fcntl.h> + +int posix_openpt(int flags); +``` + +## Description + +Open a pseudo-terminal master using the given *flags*. + +The *flags* argument accepts a bitmask of the following flags: + +* `O_RDWR`: Open for both reading and writing. +* `O_NOCTTY`: The opened pseudo-terminal will not be made the controlling TTY for the process. +* `O_CLOEXEC`: The opened fd shall be closed on [`exec`(2)](../man2/exec.md). + +## Return value + +On success, a pseudo-terminal device is allocated and `posix_openpt()` returns a file descriptor for it. Otherwise, it returns -1 and sets `errno` to describe the error. + +## Errors + +Returns the same errors as [`open`(2)](../man2/open.md). + +## See also + +* [`open`(2)](../man2/open.md) |