1unlockpt(3C) Standard C Library Functions unlockpt(3C)
2
3
4
6 unlockpt - unlock a pseudo-terminal master/slave pair
7
9 #include <stdlib.h>
10
11 int unlockpt(int fildes);
12
13
15 The unlockpt() function unlocks the slave pseudo-terminal device asso‐
16 ciated with the master to which fildes refers.
17
18
19 Portable applications must call unlockpt() before opening the slave
20 side of a pseudo-terminal device.
21
23 Upon successful completion, unlockpt() returns 0. Otherwise, it returns
24 −1 and sets errno to indicate the error.
25
27 The unlockpt() function may fail if:
28
29 EBADF The fildes argument is not a file descriptor open for writ‐
30 ing.
31
32
33 EINVAL The fildes argument is not associated with a master pseudo-
34 terminal device.
35
36
38 See attributes(5) for descriptions of the following attributes:
39
40
41
42
43 ┌─────────────────────────────┬─────────────────────────────┐
44 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
45 ├─────────────────────────────┼─────────────────────────────┤
46 │Interface Stability │Standard │
47 ├─────────────────────────────┼─────────────────────────────┤
48 │MT-Level │Safe │
49 └─────────────────────────────┴─────────────────────────────┘
50
52 open(2), grantpt(3C), ptsname(3C), attributes(5), standards(5)
53
54
55 STREAMS Programming Guide
56
57
58
59SunOS 5.11 14 Aug 2002 unlockpt(3C)