tiocgetd(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to this iconic little page for tiocgetd(9) from the Kernel API Manual β€” it's giving tiny-but-important tty lore πŸŽ€βœ¨

πŸ¦‹ NAME πŸ¦‹

  • tiocgetd β€” get line discipline πŸ’…

✨ SYNOPSIS ✨

Here's the exact signature, no cap:

int tiocgetd (struct tty_struct *tty , int __user *p );

🫢 ARGUMENTS 🫢

  • tty β€” tty device 🌸
  • p β€” pointer to user data πŸ“

πŸ’– DESCRIPTION πŸ’–

So what does it do? It retrieves the line discipline id directly from the ldisc. That's the whole slay β€” no detours, just the ldisc handing over its id like a bestie passing you your iced coffee πŸ§‹βœ¨

Locking: waits for ldisc reference (in case the line discipline is changing or the tty is being hungup) β˜•πŸ’€

So yeah, if the line discipline is mid-glow-up or the tty is being hungup, this one waits for that ldisc reference. Periodt.

🌈 SEE ALSO 🌈

Kernel file: ./drivers/tty/tty_io.c πŸ‘‘

The whole tty crew is here, and yes, we're listing every single one because nobody gets left on read πŸ’…:


mwah πŸ’‹ this page is brought to you by source/version ./drivers/tty, dated October 2026, and it's literally tiocgetd(9) β€” catch you in the tty group chat πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from