diff options
| author | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 21:07:28 -0400 |
|---|---|---|
| committer | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 21:07:28 -0400 |
| commit | 711594636704defae873be1a355a292505585afd (patch) | |
| tree | 59ee13f863830d8beba6cfd02bbe813dd486c26f /static/v10/man2/ioctl.2 | |
| parent | 3258a063c1f189d7b019e40e525b46bef9b9a7b1 (diff) | |
docs: Added UNIX V10 Manuals
Diffstat (limited to 'static/v10/man2/ioctl.2')
| -rw-r--r-- | static/v10/man2/ioctl.2 | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/static/v10/man2/ioctl.2 b/static/v10/man2/ioctl.2 new file mode 100644 index 00000000..97e3a682 --- /dev/null +++ b/static/v10/man2/ioctl.2 @@ -0,0 +1,73 @@ +.TH IOCTL 2 +.CT 2 file_io file_inq_creat +.SH NAME +ioctl \(mi miscellaneous control operations +.SH SYNOPSIS +.nf +.B #include <sgtty.h> +.PP +.B int ioctl(fildes, request, argp) +.B struct sgttyb *argp; +.fi +.SH DESCRIPTION +.I Ioctl +performs a variety of functions +on special files and streams. +The writeups of various devices +in section 4 discuss how +.I ioctl +applies to them. +.PP +Some calls, however, apply to any open file, +including +the process-exclusive calls +.BR FIOPX, +.BR FIONPX, +and +.BR FIOQX +(see +.IR pex (4)), +as well as +the following two standard calls, +.IP +.L +ioctl(fildes, FIOCLEX, (void *)0); +.br +.L +ioctl(fildes, FIONCLEX, (void *)0); +.LP +The first causes the file to be closed automatically upon +a successful +.IR exec (2); +the second causes the file to be left open. +.SH "SEE ALSO" +.IR stty (1), +.IR exec (2), +.IR proc (4), +.IR ttyld (4) +.SH DIAGNOSTICS +.BR EBADF , +.BR EFAULT , +.BR EIO , +.BR ELAB , +.BR ENODEV , +.BR ENOTTY +.SH BUGS +Strictly speaking, +since +.I ioctl +may be extended in different ways to devices with +different properties, +.I argp +should have an open-ended declaration like +.IP +.L +union { struct sgttyb ...; ... } *argp; +.PP +The important thing is that the size is at least +.B sizeof(struct +.BR sgttyb) . +.br +.I Ioctl +requests vary among UNIX systems; +undisciplined use is likely to compromise portability. |
