1 UNLOCKPT(3C) Standard C Library Functions UNLOCKPT(3C)
2
3 NAME
4 unlockpt - unlock a pseudo-terminal master/slave pair
5
6 SYNOPSIS
7 #include <stdlib.h>
8
9 int unlockpt(int fildes);
10
11
12 DESCRIPTION
13 The unlockpt() function unlocks the slave pseudo-terminal device
14 associated with the master to which fildes refers.
15
16
17 Portable applications must call unlockpt() before opening the slave
18 side of a pseudo-terminal device.
19
20 RETURN VALUES
21 Upon successful completion, unlockpt() returns 0. Otherwise, it returns
22 -1 and sets errno to indicate the error.
23
24 ERRORS
25 The unlockpt() function may fail if:
26
27 EBADF
28 The fildes argument is not a file descriptor open for
29 writing.
30
31
32 EINVAL
33 The fildes argument is not associated with a master pseudo-
34 terminal device.
35
36
37 ATTRIBUTES
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
51 SEE ALSO
52 open(2), grantpt(3C), ptsname(3C), attributes(5), standards(5)
53
54
55 STREAMS Programming Guide
56
57 August 14, 2002 UNLOCKPT(3C)
|
1 UNLOCKPT(3C) Standard C Library Functions UNLOCKPT(3C)
2
3 NAME
4 unlockpt - unlock a pseudo-terminal device pair
5
6 SYNOPSIS
7 #include <stdlib.h>
8
9 int
10 unlockpt(int fildes);
11
12 DESCRIPTION
13 When a pseudo-terminal manager device is opened, whether through
14 posix_openpt(3C) or open(2) on a ptm(7D) device, the subsidiary device
15 begins operation in a locked state. The unlockpt() function unlocks the
16 pseudo-terminal subsidiary device associated with the manager device to
17 which fildes refers.
18
19 Portable applications must call unlockpt() before opening the pseudo-
20 terminal subsidiary device.
21
22 RETURN VALUES
23 The unlockpt() function returns the value 0 if successful; otherwise the
24 value -1 is returned and the global variable errno is set to indicate the
25 error.
26
27 EXAMPLES
28 See posix_openpt(3C) for an example that includes a call to unlockpt().
29
30 ERRORS
31 The unlockpt() function may fail if:
32
33 EBADF The fildes argument is not a file descriptor open for
34 writing.
35
36 EINVAL EINVAL The fildes argument is not associated with a
37 pseudo-terminal manager device.
38
39 INTERFACE STABILITY
40 Committed
41
42 MT LEVEL
43 Safe
44
45 SEE ALSO
46 open(2), grantpt(3C), posix_openpt(3C), ptsname(3C), attributes(5),
47 standards(5), ptm(7D)
48
49 illumos February 5, 2022 illumos
|