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 POSIX.1-2001.
31
33 grantpt(3), posix_openpt(3), ptsname(3), pts(4), fea‐
34 ture_test_macros(7), pty(7)
35
36
37
38PTY Control 2003-01-30 UNLOCKPT(3)