diff options
author | cvs2svn <admin@example.com> | 2025-04-14 17:32:06 +0000 |
---|---|---|
committer | cvs2svn <admin@example.com> | 2025-04-14 17:32:06 +0000 |
commit | eb8dd9dca1228af0cd132f515509051ecfabf6f6 (patch) | |
tree | edb6da6af7e865d488dc1a29309f1e1ec226e603 /src/lib/libc/stdlib/posix_openpt.3 | |
parent | 247f0352e0ed72a4f476db9dc91f4d982bc83eb2 (diff) | |
download | openbsd-tb_20250414.tar.gz openbsd-tb_20250414.tar.bz2 openbsd-tb_20250414.zip |
This commit was manufactured by cvs2git to create tag 'tb_20250414'.tb_20250414
Diffstat (limited to 'src/lib/libc/stdlib/posix_openpt.3')
-rw-r--r-- | src/lib/libc/stdlib/posix_openpt.3 | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/src/lib/libc/stdlib/posix_openpt.3 b/src/lib/libc/stdlib/posix_openpt.3 deleted file mode 100644 index b55e1be750..0000000000 --- a/src/lib/libc/stdlib/posix_openpt.3 +++ /dev/null | |||
@@ -1,102 +0,0 @@ | |||
1 | .\" $OpenBSD: posix_openpt.3,v 1.4 2019/01/25 00:19:25 millert Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2012 Todd C. Miller <millert@openbsd.org> | ||
4 | .\" | ||
5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
7 | .\" copyright notice and this permission notice appear in all copies. | ||
8 | .\" | ||
9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | .\" | ||
17 | .Dd $Mdocdate: January 25 2019 $ | ||
18 | .Dt POSIX_OPENPT 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm posix_openpt | ||
22 | .Nd open a pseudo-terminal device | ||
23 | .Sh SYNOPSIS | ||
24 | .In stdlib.h | ||
25 | .In fcntl.h | ||
26 | .Ft int | ||
27 | .Fn posix_openpt "int oflag" | ||
28 | .Sh DESCRIPTION | ||
29 | The | ||
30 | .Fn posix_openpt | ||
31 | function finds the next available pseudo-terminal and returns an open | ||
32 | file descriptor for its master device. | ||
33 | The path name of the slave device may be determined via the | ||
34 | .Fn ptsname | ||
35 | function. | ||
36 | Note that the | ||
37 | .Fn unlockpt | ||
38 | and | ||
39 | .Fn grantpt | ||
40 | functions should be called before opening the slave device. | ||
41 | .Pp | ||
42 | The | ||
43 | .Ar oflag | ||
44 | argument is formed by bitwise-inclusive | ||
45 | .Tn OR Ns 'ing | ||
46 | the following values defined in | ||
47 | .In fcntl.h : | ||
48 | .Bl -tag -width O_NOCTTY -offset indent | ||
49 | .It Dv O_RDWR | ||
50 | Open for reading and writing. | ||
51 | .It Dv O_NOCTTY | ||
52 | Prevent the device from being made the controlling terminal for the session. | ||
53 | This flag has no effect on | ||
54 | .Ox | ||
55 | and is included for compatibility with other systems. | ||
56 | .El | ||
57 | .Pp | ||
58 | The | ||
59 | .Dv O_RDWR | ||
60 | flag must be specified in | ||
61 | .Fa oflag . | ||
62 | If | ||
63 | .Fa oflag | ||
64 | contains values other than those listed above, | ||
65 | .Fn posix_openpt | ||
66 | will return an error. | ||
67 | .Sh RETURN VALUES | ||
68 | If successful, | ||
69 | .Fn posix_openpt | ||
70 | returns a non-negative integer, the file descriptor for the | ||
71 | pseudo-terminal master device. | ||
72 | Otherwise, a value of \-1 is returned and | ||
73 | .Va errno | ||
74 | is set to indicate the error. | ||
75 | .Sh ERRORS | ||
76 | The | ||
77 | .Fn posix_openpt | ||
78 | function will fail if: | ||
79 | .Bl -tag -width Er | ||
80 | .It Bq Er EMFILE | ||
81 | The per-process descriptor table is full. | ||
82 | .It Bq Er ENFILE | ||
83 | The system file table is full. | ||
84 | .It Bq Er EINVAL | ||
85 | The value of | ||
86 | .Fa oflag | ||
87 | is not valid. | ||
88 | .El | ||
89 | .Sh SEE ALSO | ||
90 | .Xr ptsname 3 , | ||
91 | .Xr pty 4 , | ||
92 | .Xr tty 4 | ||
93 | .Sh STANDARDS | ||
94 | The | ||
95 | .Fn posix_openpt | ||
96 | function conforms to | ||
97 | .St -p1003.1-2001 . | ||
98 | .Sh HISTORY | ||
99 | The | ||
100 | .Fn posix_openpt | ||
101 | function appeared in | ||
102 | .Ox 5.3 . | ||