1UNLOCKPT(3) Linux Programmer's Manual UNLOCKPT(3)
2
3
4
6 unlockpt - unlock a pseudo-terminal master/slave pair
7
9 #define _XOPEN_SOURCE
10 #include <stdlib.h>
11
12 int unlockpt(int fd);
13
15 The unlockpt() function unlocks the slave pseudo-terminal device (pty)
16 corresponding to the master pty referred to by fd.
17
18 unlockpt() should be called before opening the slave side of a pty.
19
21 When successful, unlockpt() returns 0. Otherwise, it returns -1 and
22 sets errno appropriately.
23
25 EBADF The fd argument is not a file descriptor open for writing.
26
27 EINVAL The fd argument is not associated with a master pty.
28
30 unlockpt() is provided in glibc since version 2.1.
31
33 POSIX.1-2001.
34
36 grantpt(3), posix_openpt(3), ptsname(3), pts(4), fea‐
37 ture_test_macros(7), pty(7)
38
40 This page is part of release 3.22 of the Linux man-pages project. A
41 description of the project, and information about reporting bugs, can
42 be found at http://www.kernel.org/doc/man-pages/.
43
44
45
46 2008-06-14 UNLOCKPT(3)