TCSBRK(2const)
π TCSBRK β bestie, let's send a break
okay so welcome to the group chat, the manual page is literally called TCSBRK(2const) and it's all about sending a break down a terminal line. the stars of the show are TCSBRK, TCSBRKP, TIOCSBRK, and TIOCCBRK. yes four of them. no i will not be picking favorites. π
π LIBRARY
Standard C library (libc, -lc). the classic. the moment. β¨
πΈ SYNOPSIS
#include <asm/termbits.h> /* Definition of T*BRK* constants */
#include <sys/ioctl.h>
int ioctl(int fd, TCSBRK, int arg);
int ioctl(int fd, TCSBRKP, int arg);
int ioctl(int fd, TIOCSBRK);
int ioctl(int fd, TIOCCBRK);
look at those constants. T*BRK* coded as hell fr fr. π¦
π«Ά DESCRIPTION
TCSBRKβ lowkey justtcsendbreak(fd, arg). same energy, same everything.
so here's the tea β: if your terminal is doing asynchronous serial data transmission and arg is zero, then you send a break, which is a stream of zero bits, and it lasts somewhere between 0.25 and 0.5 seconds. if the terminal is not using asynchronous serial data transmission, then either a break gets sent, or the function just returns without doing anything. either way, no drama.
but bestie... when arg is nonzero, nobody knows what will happen. NOBODY. not you, not me, not the kernel. it's giving mystery. it's giving undefined vibes. π
and here's the receipts on who does what, because everyone was apparently on a different group chat:
SVr4,UnixWare,Solaris, andLinuxtreattcsendbreak(fd,arg)with nonzeroargliketcdrain(fd).SunOStreatsargas a multiplier, and sends a stream of bitsargtimes as long as done for zeroarg.DG/UXandAIXtreatarg(when nonzero) as a time interval measured in milliseconds.HP-UXignoresarg. iconic honestly. not a single thought. π
TCSBRKPβ the so-called "POSIX version" ofTCSBRK. it treats nonzeroargas a time interval measured in deciseconds, and does nothing when the driver does not support breaks. no break support? no problem. no anything. πTIOCSBRKβ turn break on, that is, start sending zero bits. go off king πTIOCCBRKβ turn break off, that is, stop sending zero bits. okay that's enough π
β RETURN VALUE
on success, 0 is returned. slay.
on error, -1 is returned, and errno is set to indicate the error. not slay, but at least it tells you why. π
π SEE ALSO
okay that's the whole page bestie you ATE that read π go forth and break things (literally, on a serial line, responsibly)
this was pulled straight from Linux man-pages 6.20, dated 2026-02-08 β mwah, no cap, periodt. πβ¨
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: GPL-1.0-or-later
- Copyright 2002, Walter Harms <walter.harms@informatik.uni-oldenburg.de>
- Copyright 2002, Andries E. Brouwer <aeb@cwi.nl>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms