diff options
| author | cvs2svn <admin@example.com> | 2014-04-13 15:49:51 +0000 |
|---|---|---|
| committer | cvs2svn <admin@example.com> | 2014-04-13 15:49:51 +0000 |
| commit | 9ef0d5fb5b0acfd35d73a5557198f46525ab1667 (patch) | |
| tree | 61e7e25839f716a30db270f15cddf0be6903781f /src/lib/libc/stdlib/posix_openpt.3 | |
| parent | ff237038a541d51619efa5b36fb251c8dc1e9637 (diff) | |
| download | openbsd-butholakala.tar.gz openbsd-butholakala.tar.bz2 openbsd-butholakala.zip | |
This commit was manufactured by cvs2git to create tag 'butholakala'.butholakala
Diffstat (limited to '')
| -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 376772bb07..0000000000 --- a/src/lib/libc/stdlib/posix_openpt.3 +++ /dev/null | |||
| @@ -1,102 +0,0 @@ | |||
| 1 | .\" $OpenBSD: posix_openpt.3,v 1.3 2012/12/05 06:40:59 jmc Exp $ | ||
| 2 | .\" | ||
| 3 | .\" Copyright (c) 2012 Todd C. Miller <Todd.Miller@courtesan.com> | ||
| 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: December 5 2012 $ | ||
| 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 . | ||
