TIOCSSOFTCAR(2const)
β¨ TIOCSSOFTCAR β¨
ok so bestie, welcome to the TIOCSSOFTCAR(2const) page π
this one lives in the Linux man-pages, and it's all about marking a line as local. It's a wee little page but it's doing important work, iykyk.
The two stars of the show are TIOCGSOFTCAR and TIOCSSOFTCAR, and honestly? Icons. Let's get into it π«Ά
π LIBRARY
Standard C library (libc, -lc) β the usual bestie that shows up to every party π
πΈ SYNOPSIS
#include <asm/termbits.h> /* Definition of TIOC*SOFTCAR constants */
#include <sys/ioctl.h>
int ioctl(int fd, TIOCGSOFTCAR, int *argp);
int ioctl(int fd, TIOCSSOFTCAR, const int *argp);
no cap, that's the whole vibe check right there β¨
π¦ DESCRIPTION
TIOCGSOFTCAR
aka ("Get software carrier flag") π
This one gets the status of the CLOCAL flag, and where does that flag live? In the c_cflag field of the termios structure. That's it, that's the job. Slay.
TIOCSSOFTCAR
aka ("Set software carrier flag") π
This one sets the CLOCAL flag in the termios structure when *argp is nonzero, and clears it otherwise. Very "if you know you know" of it, honestly.
ok now the β¨loreβ¨ because this actually matters:
If the CLOCAL flag for a line is off, the hardware carrier detect (DCD) signal is significant β which means an open(2) of the corresponding terminal will block until DCD is asserted, unless the O_NONBLOCK flag is given. Good luck bestie, hope you passed that flag π
If CLOCAL is set, the line behaves as if DCD is always asserted. Chill behavior. Main character energy fr fr.
The software carrier flag is usually turned on for local devices, and is off for lines with modems. That's the whole tea β
π RETURN VALUE
- On success,
0is returned π - On error,
-1is returned, anderrnois set to indicate the error. Like, it will tell you what went wrong, obsessed π
π SEE ALSO
π that's the whole page bestie, go forth and set those flags π
This delightful little number came from Linux man-pages 6.20, dated 2026-02-08 β and it's page TIOCSSOFTCAR(2const) if you're out here collecting them πβ¨
π¦ 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