tty_hung_up_p(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– tty_hung_up_p(9) β€” Kernel API Manual, bestie edition πŸ’–

Okay so we're in the Kernel API Manual today, and the icon we're stanning is tty_hung_up_p. Say it with me: was tty hung up? That's it, that's the whole vibe check. πŸŽ€


✨ NAME ✨

tty_hung_up_p β€” literally just checking: was this tty hung up? πŸ‘€


πŸ¦‹ SYNOPSIS πŸ¦‹

int tty_hung_up_p (struct file *filp );

She takes one arg and hands you back an int. No cap. πŸ’…


🌸 ARGUMENTS 🌸

  • filp β€” the file pointer of the tty. Like, the actual tty file pointer, hand it over 🫢

⭐ RETURN ⭐

Returns true if the tty has been subject to a vhangup or a carrier loss. So if it got hung up on (deliberately or because the carrier dipped 😭), you get true. That's the whole tea. πŸ”₯


πŸ’œ SEE ALSO πŸ’œ

The kernel file you wanna peek at is ./drivers/tty/tty_io.c, and honestly the whole tty friend group is here β€” go say hi to all of them:


Bestie reminder: this is the <italic>was it hung up?</italic> check, not the <italic>hang it up</italic> action. Different function, different moment, iykyk πŸ’€

And that's the whole page, periodt! 🧚 This one ships from ./drivers/tty, dated October 2026, and yes it's still filed under tty_hung_up_p(9) β€” slay. πŸ’–

πŸ“¦ where this page comes from