]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Hey Emacs! This file is -*- nroff -*- source. |
2 | .\" This page is in the public domain. - aeb | |
3 | .\" | |
c343e74c | 4 | .TH UNLOCKPT 3 2008-06-14 "" "Linux Programmer's Manual" |
fea681da | 5 | .SH NAME |
b218b023 | 6 | unlockpt \- unlock a pseudoterminal master/slave pair |
fea681da MK |
7 | .SH SYNOPSIS |
8 | .nf | |
b80f966b | 9 | .BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */" |
fea681da MK |
10 | .br |
11 | .B #include <stdlib.h> | |
12 | .sp | |
13 | .BI "int unlockpt(int " fd ");" | |
14 | .fi | |
15 | .SH DESCRIPTION | |
16 | The | |
31e9a9ec | 17 | .BR unlockpt () |
b218b023 MK |
18 | function unlocks the slave pseudoterminal device |
19 | corresponding to the master pseudoterminal referred to by | |
fea681da MK |
20 | .IR fd . |
21 | .PP | |
31e9a9ec | 22 | .BR unlockpt () |
b218b023 | 23 | should be called before opening the slave side of a pseudoterminal. |
fea681da MK |
24 | .SH "RETURN VALUE" |
25 | When successful, | |
31e9a9ec | 26 | .BR unlockpt () |
677f4766 MK |
27 | returns 0. |
28 | Otherwise, it returns \-1 and sets | |
fea681da MK |
29 | .I errno |
30 | appropriately. | |
31 | .SH ERRORS | |
32 | .TP | |
33 | .B EBADF | |
34 | The | |
35 | .I fd | |
36 | argument is not a file descriptor open for writing. | |
37 | .TP | |
38 | .B EINVAL | |
39 | The | |
40 | .I fd | |
b218b023 | 41 | argument is not associated with a master pseudoterminal. |
c343e74c MK |
42 | .SH VERSIONS |
43 | .BR unlockpt () | |
44 | is provided in glibc since version 2.1. | |
fea681da | 45 | .SH "CONFORMING TO" |
68e1685c | 46 | POSIX.1-2001. |
fea681da | 47 | .SH "SEE ALSO" |
31e9a9ec | 48 | .BR grantpt (3), |
a856c2ea | 49 | .BR posix_openpt (3), |
31e9a9ec | 50 | .BR ptsname (3), |
88ab292b | 51 | .BR pts (4), |
0a90178c | 52 | .BR feature_test_macros (7), |
88ab292b | 53 | .BR pty (7) |