]>
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 | .\" |
fe0fefbf | 5 | .TH UNLOCKPT 3 2015-03-02 "" "Linux Programmer's Manual" |
fea681da | 6 | .SH NAME |
b218b023 | 7 | unlockpt \- 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 | |
17 | The | |
31e9a9ec | 18 | .BR unlockpt () |
b218b023 MK |
19 | function unlocks the slave pseudoterminal device |
20 | corresponding to the master pseudoterminal referred to by | |
fea681da MK |
21 | .IR fd . |
22 | .PP | |
31e9a9ec | 23 | .BR unlockpt () |
b218b023 | 24 | should be called before opening the slave side of a pseudoterminal. |
47297adb | 25 | .SH RETURN VALUE |
fea681da | 26 | When successful, |
31e9a9ec | 27 | .BR unlockpt () |
677f4766 MK |
28 | returns 0. |
29 | Otherwise, it returns \-1 and sets | |
fea681da MK |
30 | .I errno |
31 | appropriately. | |
32 | .SH ERRORS | |
33 | .TP | |
34 | .B EBADF | |
35 | The | |
36 | .I fd | |
37 | argument is not a file descriptor open for writing. | |
38 | .TP | |
39 | .B EINVAL | |
40 | The | |
41 | .I fd | |
b218b023 | 42 | argument is not associated with a master pseudoterminal. |
c343e74c MK |
43 | .SH VERSIONS |
44 | .BR unlockpt () | |
45 | is provided in glibc since version 2.1. | |
d17763e0 | 46 | .SH ATTRIBUTES |
5f97b918 PH |
47 | For an explanation of the terms used in this section, see |
48 | .BR attributes (7). | |
49 | .TS | |
50 | allbox; | |
51 | lb lb lb | |
52 | l l l. | |
53 | Interface Attribute Value | |
54 | T{ | |
d17763e0 | 55 | .BR unlockpt () |
5f97b918 PH |
56 | T} Thread safety MT-Safe |
57 | .TE | |
47297adb | 58 | .SH CONFORMING TO |
861246f7 | 59 | POSIX.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) |