tty_tiocmset(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tty_tiocmset β€” set modem status ✨

okay so bestie, welcome to the Kernel API Manual page for tty_tiocmset(9) β€” yes it's a section 9 page, yes it's kernel-internal, no you cannot escape the tty subsystem, it's literally everywhere πŸ’€


✨ SYNOPSIS ✨

int tty_tiocmset (struct tty_struct *tty , unsigned int cmd , unsigned
__user *p );

that's the whole signature, no notes, she's serving "three-argument queen" and honestly? iconic.


πŸŽ€ ARGUMENTS πŸŽ€

  • tty β€” the tty device, your main character, the whole point 🫢
  • cmd β€” the command, and she's one of three vibes: clear bits, set bits, or set all β€” pick your fighter πŸ’…
  • p β€” a pointer to the bits you actually want, the user-space wish list, the blueprint 🌸

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea: tty_tiocmset sets the modem status bits, and it does that from the tty driver β€” but only if the driver's feature set actually supports it. not everyone can sit with us, y'know?

if the feature is not available, it returns -ENOTTY. that's it, that's the rejection text, no explanation, just -ENOTTY and a closed door 😭

Locking: none (up to the driver) β€” like, the function itself takes no locks, so if the driver needs locking, the driver sorts it out. no cap, that's the actual deal πŸ™ˆ

πŸ’œ SEE ALSO πŸ’œ

the lore is deep, so here's the full squad, straight from the kernel file ./drivers/tty/tty_io.c:

that's sixty-something friends and every single one of them is a real cross-reference, i checked, i would never lie to you πŸ’–


and that's the page!! mwah πŸ’‹

cute little sign-off bestie: this one lives in ./drivers/tty and she was stamped October 2026 β€” go read the source, go be obsessed, go set some modem status bits, periodt πŸŽ€πŸ‘‘

πŸ“¦ where this page comes from