tty_port_hangup(9)
π 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:
tty_port_init(9)tty_port_link_wq(9)tty_port_link_device(9)tty_port_register_device(9)tty_port_register_device_attr(9)tty_port_register_device_attr_serdev(9)tty_port_unregister_device(9)tty_port_destroy(9)tty_port_put(9)tty_port_tty_get(9)tty_port_tty_set(9)tty_port_shutdown(9)tty_port_tty_hangup(9)tty_port_tty_vhangup(9)tty_port_tty_wakeup(9)tty_port_carrier_raised(9)tty_port_raise_dtr_rts(9)tty_port_lower_dtr_rts(9)tty_port_block_til_ready(9)tty_port_close_start(9)tty_port_close_end(9)tty_port_close(9)tty_port_install(9)tty_port_open(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms