]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/unlockpt.3
Changes, ldd.1, chown.2, epoll_wait.2, get_mempolicy.2, ioctl_getfsmap.2, madvise...
[thirdparty/man-pages.git] / man3 / unlockpt.3
CommitLineData
2d6c6dd1 1.\" %%%LICENSE_START(PUBLIC_DOMAIN)
fea681da 2.\" This page is in the public domain. - aeb
2d6c6dd1 3.\" %%%LICENSE_END
fea681da 4.\"
f55a6d59 5.TH UNLOCKPT 3 2017-07-13 "" "Linux Programmer's Manual"
fea681da 6.SH NAME
b218b023 7unlockpt \- unlock a pseudoterminal master/slave pair
fea681da 8.SH SYNOPSIS
c2ba3716 9.B #define _XOPEN_SOURCE
fea681da
MK
10.br
11.B #include <stdlib.h>
12.sp
13.BI "int unlockpt(int " fd ");"
c2ba3716
FT
14.sp
15.in -4n
16Feature Test Macro Requirements for glibc (see
17.BR feature_test_macros (7)):
18.in
19.PP
20.ad l
21.BR unlockpt ():
22.br
23.RS 4
24Since glibc 2.24:
25 _XOPEN_SOURCE\ >=\ 500 ||
26 (_XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED)
27.br
28Glibc 2.23 and earlier:
29 _XOPEN_SOURCE
30.RE
31.ad
fea681da
MK
32.SH DESCRIPTION
33The
31e9a9ec 34.BR unlockpt ()
b218b023
MK
35function unlocks the slave pseudoterminal device
36corresponding to the master pseudoterminal referred to by
fea681da
MK
37.IR fd .
38.PP
31e9a9ec 39.BR unlockpt ()
b218b023 40should be called before opening the slave side of a pseudoterminal.
47297adb 41.SH RETURN VALUE
fea681da 42When successful,
31e9a9ec 43.BR unlockpt ()
677f4766
MK
44returns 0.
45Otherwise, it returns \-1 and sets
fea681da
MK
46.I errno
47appropriately.
48.SH ERRORS
49.TP
50.B EBADF
51The
52.I fd
53argument is not a file descriptor open for writing.
54.TP
55.B EINVAL
56The
57.I fd
b218b023 58argument is not associated with a master pseudoterminal.
c343e74c
MK
59.SH VERSIONS
60.BR unlockpt ()
61is provided in glibc since version 2.1.
d17763e0 62.SH ATTRIBUTES
5f97b918
PH
63For an explanation of the terms used in this section, see
64.BR attributes (7).
65.TS
66allbox;
67lb lb lb
68l l l.
69Interface Attribute Value
70T{
d17763e0 71.BR unlockpt ()
5f97b918
PH
72T} Thread safety MT-Safe
73.TE
47297adb 74.SH CONFORMING TO
861246f7 75POSIX.1-2001, POSIX.1-2008.
47297adb 76.SH SEE ALSO
31e9a9ec 77.BR grantpt (3),
a856c2ea 78.BR posix_openpt (3),
31e9a9ec 79.BR ptsname (3),
88ab292b
MK
80.BR pts (4),
81.BR pty (7)