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, 0 is returned 🌈
  • On error, -1 is returned, and errno is 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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms