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 just tcsendbreak(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, and Linux treat tcsendbreak(fd,arg) with nonzero arg like tcdrain(fd).
  • SunOS treats arg as a multiplier, and sends a stream of bits arg times as long as done for zero arg.
  • DG/UX and AIX treat arg (when nonzero) as a time interval measured in milliseconds.
  • HP-UX ignores arg. iconic honestly. not a single thought. πŸ™ˆ
  • TCSBRKP β€” the so-called "POSIX version" of TCSBRK. it treats nonzero arg as 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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms