1GETPT(3) Linux Programmer's Manual GETPT(3)
2
3
4
6 getpt - open the pseudo-terminal master (PTM)
7
9 #include <stdlib.h>
10
11 int getpt(void)
12
14 getpt() opens a pseudo-terminal master and returns its file descriptor.
15 It is equivalent to open("/dev/ptmx",O_RDWR|O_NOCTTY) on Linux systems,
16 though the pseudo-terminal master is located elsewhere on some systems
17 that use GNU Libc.
18
19
21 getpt() returns an open file descriptor upon successful completion.
22 Otherwise, it returns -1 and sets errno to indicate the error.
23
25 getpt() is specific to GNU Libc.
26
28 grantpt(3), ptsname(3), posix_openpt(3), unlockpt(3), ptmx(4), pty(7)
29
30
31
32PTY Control 2002-10-09 GETPT(3)