1UNLOCKPT(3P) POSIX Programmer's Manual UNLOCKPT(3P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 unlockpt - unlock a pseudo-terminal master/slave pair
13
15 #include <stdlib.h>
16
17 int unlockpt(int fildes);
18
19
21 The unlockpt() function shall unlock the slave pseudo-terminal device
22 associated with the master to which fildes refers.
23
24 Conforming applications shall ensure that they call unlockpt() before
25 opening the slave side of a pseudo-terminal device.
26
28 Upon successful completion, unlockpt() shall return 0. Otherwise, it
29 shall return -1 and set errno to indicate the error.
30
32 The unlockpt() function may fail if:
33
34 EBADF The fildes argument is not a file descriptor open for writing.
35
36 EINVAL The fildes argument is not associated with a master pseudo-ter‐
37 minal device.
38
39
40 The following sections are informative.
41
43 None.
44
46 None.
47
49 None.
50
52 None.
53
55 grantpt(), open(), ptsname(), the Base Definitions volume of
56 IEEE Std 1003.1-2001, <stdlib.h>
57
59 Portions of this text are reprinted and reproduced in electronic form
60 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
61 -- Portable Operating System Interface (POSIX), The Open Group Base
62 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
63 Electrical and Electronics Engineers, Inc and The Open Group. In the
64 event of any discrepancy between this version and the original IEEE and
65 The Open Group Standard, the original IEEE and The Open Group Standard
66 is the referee document. The original Standard can be obtained online
67 at http://www.opengroup.org/unix/online.html .
68
69
70
71IEEE/The Open Group 2003 UNLOCKPT(3P)