1UNLOCKPT(3)                Linux Programmer's Manual               UNLOCKPT(3)
2
3
4

NAME

6       unlockpt - unlock a pseudo-terminal master/slave pair
7

SYNOPSIS

9       #define _XOPEN_SOURCE
10       #include <stdlib.h>
11
12       int unlockpt(int fd);
13

DESCRIPTION

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

RETURN VALUE

21       When successful, unlockpt() returns 0. Otherwise,  it  returns  -1  and
22       sets errno appropriately.
23

ERRORS

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

CONFORMING TO

30       POSIX.1-2001.
31

SEE ALSO

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)
Impressum