]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/getpt.3
Changed SEE ALSO
[thirdparty/man-pages.git] / man3 / getpt.3
CommitLineData
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
7getpt \- 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()
16opens a pseudo-terminal master and returns its file descriptor.
17It is equivalent to
18.BI "open(" \fI"/dev/ptmx" , O_RDWR|O_NOCTTY )
19on Linux systems, though the pseudo-terminal master is located
20elsewhere on some systems that use GNU Libc.
21
22.SH "RETURN VALUE"
23.B getpt()
24returns an open file descriptor upon successful completion. Otherwise, it
25returns -1 and sets
26.I errno
27to indicate the error.
28.SH CONFORMING TO
29.B getpt()
30is 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)