1 .\" This man page was written by Jeremy Phelps <jphelps@notreached.net>.
3 .\" %%%LICENSE_START(FREELY_REDISTRIBUTABLE)
4 .\" Redistribute and modify at will.
7 .TH GETPT 3 2014-04-01 "GNU" "Linux Programmer's Manual"
9 getpt \- open the pseudoterminal master (PTM)
12 .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
13 .B #include <stdlib.h>
19 opens a pseudoterminal master and returns its file descriptor.
23 open(/dev/ptmx, O_RDWR | O_NOCTTY);
26 on Linux systems, though the pseudoterminal master is located
27 elsewhere on some systems that use GNU Libc.
30 returns an open file descriptor upon successful completion.
34 to indicate the error.
37 can fail with various errors described in
41 is provided in glibc since version 2.1.
43 .SS Multithreading (see pthreads(7))
46 function is thread-safe.
61 This page is part of release 3.79 of the Linux
64 A description of the project,
65 information about reporting bugs,
66 and the latest version of this page,
68 \%http://www.kernel.org/doc/man\-pages/.