tty_change_softcar(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tty_change_softcar(9) β€” the carrier-change glow-up

okay so real talk, this is a page straight out of the Kernel API Manual, section 9, and it's called tty_change_softcar β€” yes bestie, that's the whole name, iykyk πŸŽ€ It's a lil helper for the carrier change ioctl, and honestly? It's giving tiny-but-mighty. ✨


🌸 NAME 🌸

tty_change_softcar β€” the carrier change ioctl helper. that's it, that's the icon. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

int tty_change_softcar (struct tty_struct *tty , bool enable );

copy it exactly bestie, spacing and all, don't @ me πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • tty β€” the tty you're updating. the main character of this whole function, fr.
  • enable β€” turns CLOCAL on or off. on. off. the binary slay. 🌈

✨ DESCRIPTION ✨

so what it actually does: it performs a change to the CLOCAL state, then calls into the driver layer to make that change visible. like, it doesn't just think about the change, it makes sure everyone can see it. visibility is key, queens. 🫢

Locking: tty_struct->termios_rwsem β€” that's the lock situation, and no, we're not skipping it. respect the rwsem. πŸ”’


πŸ”₯ RETURN πŸ”₯

  • 0 on success β€” the good ending, we love to see it πŸ’–
  • an error otherwise β€” the not-so-good ending, still valid tho 😭

🌈 SEE ALSO 🌈

the kernel file lives at ./drivers/tty/tty_ioctl.c, and here's the whole friend group that comes with it β€” no gatekeeping, we share the whole list:


and that's the page bestie, go forth and flip that CLOCAL bit responsibly πŸ§šπŸ’œ

this lil cutie is brought to you by ./drivers/tty, dated October 2026, courtesy of the Kernel API Manual. mwah. πŸ’‹
πŸ“¦ where this page comes from