Debian Codegraph @

upstream/debian-unstable/man2/TIOCSLCKTRMIOS.2const

raw
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 TIOCSLCKTRMIOS 2const 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 TIOCGLCKTRMIOS,
10 TIOCSLCKTRMIOS
11 \-
12 locking the termios structre
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*CLKTRMIOS " constants */"
19 .B #include <sys/ioctl.h>
20 .P
21 .BI "int ioctl(int " fd ", TIOCGLCKTRMIOS, struct termios *" argp );
22 .BI "int ioctl(int " fd ", TIOCSLCKTRMIOS, const struct termios *" argp );
23 .P
24 .B #include <asm/termbits.h>
25 .P
26 .B struct termios;
27 .fi
28 .SH DESCRIPTION
29 The
30 .I termios
31 structure of a terminal can be locked.
32 The lock is itself a
33 .I termios
34 structure, with nonzero bits or fields indicating a
35 locked value.
36 .TP
37 .B TIOCGLCKTRMIOS
38 Gets the locking status of the
39 .I termios
40 structure of the terminal.
41 .TP
42 .B TIOCSLCKTRMIOS
43 Sets the locking status of the
44 .I termios
45 structure of the terminal.
46 Only a process with the
47 .B CAP_SYS_ADMIN
48 capability can do this.
49 .SH RETURN VALUE
50 On success,
51 0 is returned.
52 On error,
53 \-1 is returned, and
54 .I errno
55 is set to indicate the error.
56 .SH ERRORS
57 .TP
58 .B EPERM
59 Insufficient permission.
60 .SH CAVEATS
61 Please note that
62 .B struct termios
63 from
64 .I <asm/termbits.h>
65 is different and incompatible with
66 .B struct termios
67 from
68 .IR <termios.h> .
69 These ioctl calls require
70 .B struct termios
71 from
72 .IR <asm/termbits.h> .
73 .SH SEE ALSO
74 .BR ioctl (2),
75 .BR ioctl_tty (2),
76 .BR TCSETS (2const)