Debian Codegraph @

upstream/debian-unstable/man2/TCSBRK.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 TCSBRK 2const 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 TCSBRK,
10 TCSBRKP,
11 TIOCSBRK,
12 TIOCCBRK
13 \-
14 sending a break
15 .SH LIBRARY
16 Standard C library
17 .RI ( libc ,\~ \-lc )
18 .SH SYNOPSIS
19 .nf
20 .BR "#include <asm/termbits.h>" " /* Definition of " T*BRK* " constants */"
21 .B #include <sys/ioctl.h>
22 .P
23 .BI "int ioctl(int " fd ", TCSBRK, int " arg );
24 .BI "int ioctl(int " fd ", TCSBRKP, int " arg );
25 .BI "int ioctl(int " fd ", TIOCSBRK);"
26 .BI "int ioctl(int " fd ", TIOCCBRK);"
27 .fi
28 .SH DESCRIPTION
29 .TP
30 .B TCSBRK
31 Equivalent to
32 .IR "tcsendbreak(fd, arg)" .
33 .IP
34 If the terminal is using asynchronous serial data transmission, and
35 .I arg
36 is zero, then send a break (a stream of zero bits) for between
37 0.25 and 0.5 seconds.
38 If the terminal is not using asynchronous
39 serial data transmission, then either a break is sent, or the function
40 returns without doing anything.
41 When
42 .I arg
43 is nonzero, nobody knows what will happen.
44 .IP
45 (SVr4, UnixWare, Solaris, and Linux treat
46 .I "tcsendbreak(fd,arg)"
47 with nonzero
48 .I arg
49 like
50 .IR "tcdrain(fd)" .
51 SunOS treats
52 .I arg
53 as a multiplier, and sends a stream of bits
54 .I arg
55 times as long as done for zero
56 .IR arg .
57 DG/UX and AIX treat
58 .I arg
59 (when nonzero) as a time interval measured in milliseconds.
60 HP-UX ignores
61 .IR arg .)
62 .TP
63 .B TCSBRKP
64 So-called "POSIX version" of
65 .BR TCSBRK .
66 It treats nonzero
67 .I arg
68 as a time interval measured in deciseconds, and does nothing
69 when the driver does not support breaks.
70 .TP
71 .B TIOCSBRK
72 Turn break on, that is, start sending zero bits.
73 .TP
74 .B TIOCCBRK
75 Turn break off, that is, stop sending zero bits.
76 .SH RETURN VALUE
77 On success,
78 0 is returned.
79 On error,
80 \-1 is returned, and
81 .I errno
82 is set to indicate the error.
83 .SH SEE ALSO
84 .BR ioctl (2),
85 .BR ioctl_tty (2)