]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Hey Emacs! This file is -*- nroff -*- source. |
2 | .\" This man page was written by Jeremy Phelps <jphelps@notreached.net>. | |
3 | .\" Redistribute and modify at will. | |
4 | .\" | |
5 | .TH GETPT 3 "2002-10-09" "PTY Control" "Linux Programmer's Manual" | |
6 | .SH NAME | |
7 | getpt \- open the pseudo-terminal master (PTM) | |
8 | .SH SYNOPSIS | |
9 | .nf | |
10 | .B #include <stdlib.h> | |
11 | .sp | |
12 | .B "int getpt(void)" | |
13 | .fi | |
14 | .SH DESCRIPTION | |
15 | .B getpt() | |
16 | opens a pseudo-terminal master and returns its file descriptor. | |
17 | It is equivalent to | |
18 | .BI "open(" \fI"/dev/ptmx" , O_RDWR|O_NOCTTY ) | |
19 | on Linux systems, though the pseudo-terminal master is located | |
20 | elsewhere on some systems that use GNU Libc. | |
21 | ||
22 | .SH "RETURN VALUE" | |
23 | .B getpt() | |
24 | returns an open file descriptor upon successful completion. Otherwise, it | |
25 | returns -1 and sets | |
26 | .I errno | |
27 | to indicate the error. | |
28 | .SH CONFORMING TO | |
29 | .B getpt() | |
30 | is specific to GNU Libc. | |
31 | .SH "SEE ALSO" | |
32 | .BR grantpt (3), | |
33 | .BR ptsname (3), | |
a856c2ea | 34 | .BR posix_openpt (3), |
fea681da MK |
35 | .BR unlockpt (3), |
36 | .BR ptmx (4) |