tty_port_tty_set(9)
π tty_port_tty_set(9) β the Kernel API Manual bestie era
okay so welcome to the Kernel API Manual page for tty_port_tty_set(9), we're literally in ./drivers/tty land and it's giving very much "tiny function, big responsibilities" β¨
πΈ NAME πΈ
tty_port_tty_set β set the tty of a port, no cap π
π¦ SYNOPSIS π¦
void tty_port_tty_set (struct tty_port *port , struct tty_struct *tty );
like that's it, that's the whole signature, she's simple and she's iconic π
π ARGUMENTS π
portβ the tty port. your port. the one you're matching up π«Άttyβ the tty. the other half of this little situationship π
π DESCRIPTION π
okay so here's the tea: this function associates the port and tty pair, like officially, like they're linked now π and yes she manages any internal refcounts for you because she's a responsible queen, no notes β¨
and the big one β if you pass NULL as the tty, that deassociates the port. it's the breakup arc π lowkey sad but highkey necessary.
fr fr: NULL here isn't an error, it's the actual documented way to deassociate a port. don't panic when you see it π
π SEE ALSO π
the whole friend group, gathered for the vibes π
- Kernel file
./drivers/tty/tty_port.c 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_shutdown(9)tty_port_hangup(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)
literally the entire tty_port squad, go say hi π«Ά
and that's the page bestie!! this one came from the ./drivers/tty corner of the kernel, dated October 2026, signed off with the classic tty_port_tty_set(9) energy. stay glazed, stay refcounted, mwah πβ¨
π¦ 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