1 .\" %%%LICENSE_START(PUBLIC_DOMAIN)
2 .\" This page is in the public domain. - aeb
5 .TH UNLOCKPT 3 2021-03-22 GNU "Linux Programmer's Manual"
7 unlockpt \- unlock a pseudoterminal master/slave pair
10 .RI ( libc ", " \-lc )
13 .B #define _XOPEN_SOURCE
14 .B #include <stdlib.h>
16 .BI "int unlockpt(int " fd );
20 Feature Test Macro Requirements for glibc (see
21 .BR feature_test_macros (7)):
28 .\" || (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED)
29 Glibc 2.23 and earlier:
35 function unlocks the slave pseudoterminal device
36 corresponding to the master pseudoterminal referred to by the file descriptor
40 should be called before opening the slave side of a pseudoterminal.
45 Otherwise, it returns \-1 and sets
47 to indicate the error.
53 argument is not a file descriptor open for writing.
58 argument is not associated with a master pseudoterminal.
61 is provided in glibc since version 2.1.
63 For an explanation of the terms used in this section, see
71 Interface Attribute Value
74 T} Thread safety MT-Safe
80 POSIX.1-2001, POSIX.1-2008.