]>
Commit | Line | Data |
---|---|---|
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 | 7 | unlockpt \- 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> | |
68e4db0a | 12 | .PP |
fea681da | 13 | .BI "int unlockpt(int " fd ");" |
68e4db0a | 14 | .PP |
c2ba3716 FT |
15 | .in -4n |
16 | Feature 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 | |
24 | Since glibc 2.24: | |
25 | _XOPEN_SOURCE\ >=\ 500 || | |
26 | (_XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED) | |
27 | .br | |
28 | Glibc 2.23 and earlier: | |
29 | _XOPEN_SOURCE | |
30 | .RE | |
31 | .ad | |
fea681da MK |
32 | .SH DESCRIPTION |
33 | The | |
31e9a9ec | 34 | .BR unlockpt () |
b218b023 MK |
35 | function unlocks the slave pseudoterminal device |
36 | corresponding to the master pseudoterminal referred to by | |
fea681da MK |
37 | .IR fd . |
38 | .PP | |
31e9a9ec | 39 | .BR unlockpt () |
b218b023 | 40 | should be called before opening the slave side of a pseudoterminal. |
47297adb | 41 | .SH RETURN VALUE |
fea681da | 42 | When successful, |
31e9a9ec | 43 | .BR unlockpt () |
677f4766 MK |
44 | returns 0. |
45 | Otherwise, it returns \-1 and sets | |
fea681da MK |
46 | .I errno |
47 | appropriately. | |
48 | .SH ERRORS | |
49 | .TP | |
50 | .B EBADF | |
51 | The | |
52 | .I fd | |
53 | argument is not a file descriptor open for writing. | |
54 | .TP | |
55 | .B EINVAL | |
56 | The | |
57 | .I fd | |
b218b023 | 58 | argument is not associated with a master pseudoterminal. |
c343e74c MK |
59 | .SH VERSIONS |
60 | .BR unlockpt () | |
61 | is provided in glibc since version 2.1. | |
d17763e0 | 62 | .SH ATTRIBUTES |
5f97b918 PH |
63 | For an explanation of the terms used in this section, see |
64 | .BR attributes (7). | |
65 | .TS | |
66 | allbox; | |
67 | lb lb lb | |
68 | l l l. | |
69 | Interface Attribute Value | |
70 | T{ | |
d17763e0 | 71 | .BR unlockpt () |
5f97b918 PH |
72 | T} Thread safety MT-Safe |
73 | .TE | |
47297adb | 74 | .SH CONFORMING TO |
861246f7 | 75 | POSIX.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) |