| 1 |
.\" Copyright 2002, Walter Harms <[email protected]> |
| 2 |
.\" Copyright 2002, Andries E. Brouwer <[email protected]> |
| 3 |
.\" Copyright, the authors of the Linux man-pages project |
| 4 |
.\" |
| 5 |
.\" SPDX-License-Identifier: GPL-1.0-or-later |
| 6 |
.\" |
| 7 |
.TH TIOCSETD 2const 2026-02-08 "Linux man-pages 6.18" |
| 8 |
.SH NAME |
| 9 |
TIOCGETD, |
| 10 |
TIOCSETD |
| 11 |
\- |
| 12 |
get or set the line discipline of the terminal |
| 13 |
.SH LIBRARY |
| 14 |
Standard C library |
| 15 |
.RI ( libc ,\~ \-lc ) |
| 16 |
.SH SYNOPSIS |
| 17 |
.nf |
| 18 |
.BR "#include <asm/termbits.h>" " /* Definition of " TIOC*ETD " constants */" |
| 19 |
.B #include <sys/ioctl.h> |
| 20 |
.P |
| 21 |
.BI "int ioctl(int " fd ", TIOCGETD, int *" argp ); |
| 22 |
.BI "int ioctl(int " fd ", TIOCSETD, const int *" argp ); |
| 23 |
.fi |
| 24 |
.SH DESCRIPTION |
| 25 |
.TP |
| 26 |
.B TIOCGETD |
| 27 |
Get the line discipline of the terminal. |
| 28 |
.TP |
| 29 |
.B TIOCSETD |
| 30 |
Set the line discipline of the terminal. |
| 31 |
.SH RETURN VALUE |
| 32 |
On success, |
| 33 |
0 is returned. |
| 34 |
On error, |
| 35 |
\-1 is returned, and |
| 36 |
.I errno |
| 37 |
is set to indicate the error. |
| 38 |
.SH SEE ALSO |
| 39 |
.BR ioctl (2), |
| 40 |
.BR ioctl_tty (2) |