2 .\" This man page was written by Jeremy Phelps <jphelps@notreached.net>.
4 .\" %%%LICENSE_START(FREELY_REDISTRIBUTABLE)
5 .\" Redistribute and modify at will.
8 .TH getpt 3 (date) "Linux man-pages (unreleased)"
10 getpt \- open a new pseudoterminal master
13 .RI ( libc ", " \-lc )
16 .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
17 .B #include <stdlib.h>
23 opens a new pseudoterminal device and returns a file descriptor
24 that refers to that device.
25 It is equivalent to opening the pseudoterminal multiplexor device
29 open("/dev/ptmx", O_RDWR);
33 on Linux systems, though the pseudoterminal multiplexor device is located
34 elsewhere on some systems that use the GNU C library.
37 returns an open file descriptor upon successful completion.
41 to indicate the error.
44 can fail with various errors described in
47 For an explanation of the terms used in this section, see
53 Interface Attribute Value
58 T} Thread safety MT-Safe