tty_port_hangup(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tty_port_hangup(9) β€” okay so this is the Kernel API Manual, bestie πŸŽ€

Like, the whole thing lives in the Kernel API Manual, section 9, and it's called tty_port_hangup. Say it with me. Slay. ✨


✨ NAME ✨

tty_port_hangup β€” the hangup helper 🫢 like it literally does the hangup thing for you, no cap


🌸 SYNOPSIS 🌸

void tty_port_hangup (struct tty_port *port );

That's it. That's the whole call. Iconic, honestly. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • port β€” the tty port πŸ’– (yes, that's genuinely all it says, and yes, struct tty_port * is the type β€” the vibe check is: it's a port, you pass it in, done ✨)

πŸ”₯ DESCRIPTION πŸ”₯

So what does this actually do, you ask? It performs the port-level tty hangup flag and count changes πŸŽ€ β€” like the flag gets flipped and the count gets adjusted, at the port level, on purpose, by this function.

Then it drops the tty reference πŸ’€ β€” one reference, gone, poof, released, bye πŸ‘‹

⚠️ OKAY THIS PART MATTERS, FR FR: the caller holds the tty lock. Like, you hold it, going in. This is not optional, this is not vibes, this is a precondition. Don't be out here calling it without the lock, I'm begging πŸ™ˆ

πŸ’œ SEE ALSO πŸ’œ

The kernel file ./drivers/tty/tty_port.c, and honestly the whole friend group 😭 β€” every single sibling function, here we go, main character energy for all of them:

Like, the entire lineup. Obsessed. πŸ¦‹πŸ’–


Okay that's the page!! πŸ“ This cutie is filed under ./drivers/tty, dated October 2026, and it goes by tty_port_hangup(9) β€” mwah, go read the others too, ily, bye bestie! πŸŒˆπŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from