1GETPT(3)                   Linux Programmer's Manual                  GETPT(3)
2
3
4

NAME

6       getpt - open the pseudoterminal master (PTM)
7

SYNOPSIS

9       #define _GNU_SOURCE             /* See feature_test_macros(7) */
10       #include <stdlib.h>
11
12       int getpt(void);
13

DESCRIPTION

15       getpt()  opens a pseudoterminal master and returns its file descriptor.
16       It is equivalent to
17
18           open(/dev/ptmx, O_RDWR | O_NOCTTY);
19
20       on Linux systems, though the pseudoterminal master is located elsewhere
21       on some systems that use GNU Libc.
22

RETURN VALUE

24       getpt()  returns  an  open  file descriptor upon successful completion.
25       Otherwise, it returns -1 and sets errno to indicate the error.
26

ERRORS

28       getpt() can fail with various errors described in open(2).
29

VERSIONS

31       getpt() is provided in glibc since version 2.1.
32

CONFORMING TO

34       getpt() is glibc-specific; use posix_openpt(3) instead.
35

SEE ALSO

37       grantpt(3), posix_openpt(3), ptsname(3), unlockpt(3), ptmx(4), pty(7)
38

COLOPHON

40       This page is part of release 3.53 of the Linux  man-pages  project.   A
41       description  of  the project, and information about reporting bugs, can
42       be found at http://www.kernel.org/doc/man-pages/.
43
44
45
46GNU                               2010-09-10                          GETPT(3)
Impressum