Debian Codegraph @

upstream/debian-unstable/man2/TIOCSSOFTCAR.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 TIOCSSOFTCAR 2const 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 TIOCGSOFTCAR,
10 TIOCSSOFTCAR
11 \-
12 marking a line as local
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*SOFTCAR " constants */"
19 .B #include <sys/ioctl.h>
20 .P
21 .BI "int ioctl(int " fd ", TIOCGSOFTCAR, int *" argp );
22 .BI "int ioctl(int " fd ", TIOCSSOFTCAR, const int *" argp );
23 .fi
24 .SH DESCRIPTION
25 .TP
26 .B TIOCGSOFTCAR
27 ("Get software carrier flag")
28 Get the status of the CLOCAL flag in the c_cflag field of the
29 .I termios
30 structure.
31 .TP
32 .B TIOCSSOFTCAR
33 ("Set software carrier flag")
34 Set the CLOCAL flag in the
35 .I termios
36 structure when
37 .RI * argp
38 is nonzero, and clear it otherwise.
39 .P
40 If the
41 .B CLOCAL
42 flag for a line is off, the hardware carrier detect (DCD)
43 signal is significant, and an
44 .BR open (2)
45 of the corresponding terminal will block until DCD is asserted,
46 unless the
47 .B O_NONBLOCK
48 flag is given.
49 If
50 .B CLOCAL
51 is set, the line behaves as if DCD is always asserted.
52 The software carrier flag is usually turned on for local devices,
53 and is off for lines with modems.
54 .SH RETURN VALUE
55 On success,
56 0 is returned.
57 On error,
58 \-1 is returned, and
59 .I errno
60 is set to indicate the error.
61 .SH SEE ALSO
62 .BR ioctl (2),
63 .BR ioctl_tty (2)