1UNLOCKPT(3) Linux Programmer's Manual UNLOCKPT(3)
2
3
4
6 unlockpt - unlock a pseudoterminal master/slave pair
7
9 #define _XOPEN_SOURCE /* See feature_test_macros(7) */
10 #include <stdlib.h>
11
12 int unlockpt(int fd);
13
15 The unlockpt() function unlocks the slave pseudoterminal device corre‐
16 sponding to the master pseudoterminal referred to by fd.
17
18 unlockpt() should be called before opening the slave side of a pseu‐
19 doterminal.
20
22 When successful, unlockpt() returns 0. Otherwise, it returns -1 and
23 sets errno appropriately.
24
26 EBADF The fd argument is not a file descriptor open for writing.
27
28 EINVAL The fd argument is not associated with a master pseudoterminal.
29
31 unlockpt() is provided in glibc since version 2.1.
32
34 POSIX.1-2001.
35
37 grantpt(3), posix_openpt(3), ptsname(3), pts(4), pty(7)
38
40 This page is part of release 3.53 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)