]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/unlockpt.3
dlinfo.3: ATTRIBUTES: Note function that is thread-safe
[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.\"
fe0fefbf 5.TH UNLOCKPT 3 2015-03-02 "" "Linux Programmer's Manual"
fea681da 6.SH NAME
b218b023 7unlockpt \- unlock a pseudoterminal master/slave pair
fea681da
MK
8.SH SYNOPSIS
9.nf
b80f966b 10.BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */"
fea681da
MK
11.br
12.B #include <stdlib.h>
13.sp
14.BI "int unlockpt(int " fd ");"
15.fi
16.SH DESCRIPTION
17The
31e9a9ec 18.BR unlockpt ()
b218b023
MK
19function unlocks the slave pseudoterminal device
20corresponding to the master pseudoterminal referred to by
fea681da
MK
21.IR fd .
22.PP
31e9a9ec 23.BR unlockpt ()
b218b023 24should be called before opening the slave side of a pseudoterminal.
47297adb 25.SH RETURN VALUE
fea681da 26When successful,
31e9a9ec 27.BR unlockpt ()
677f4766
MK
28returns 0.
29Otherwise, it returns \-1 and sets
fea681da
MK
30.I errno
31appropriately.
32.SH ERRORS
33.TP
34.B EBADF
35The
36.I fd
37argument is not a file descriptor open for writing.
38.TP
39.B EINVAL
40The
41.I fd
b218b023 42argument is not associated with a master pseudoterminal.
c343e74c
MK
43.SH VERSIONS
44.BR unlockpt ()
45is provided in glibc since version 2.1.
d17763e0 46.SH ATTRIBUTES
5f97b918
PH
47For an explanation of the terms used in this section, see
48.BR attributes (7).
49.TS
50allbox;
51lb lb lb
52l l l.
53Interface Attribute Value
54T{
d17763e0 55.BR unlockpt ()
5f97b918
PH
56T} Thread safety MT-Safe
57.TE
47297adb 58.SH CONFORMING TO
861246f7 59POSIX.1-2001, POSIX.1-2008.
47297adb 60.SH SEE ALSO
31e9a9ec 61.BR grantpt (3),
a856c2ea 62.BR posix_openpt (3),
31e9a9ec 63.BR ptsname (3),
88ab292b
MK
64.BR pts (4),
65.BR pty (7)