tty_vhangup_session(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tty_vhangup_session(9) πŸ’…

okay bestie, welcome to the Kernel API Manual corner where we talk about hanging up a tty without making it weird. This is the page for tty_vhangup_session(9), and yes, the name is a whole mouthful. iykyk. πŸ’–


πŸ’– NAME πŸ’–

tty_vhangup_session β€” hangup session leader exit, aka the hangup that happens when the session leader exits. πŸ’…

✨ SYNOPSIS ✨

void tty_vhangup_session (struct tty_struct *tty );

🫢 ARGUMENTS 🫢

  • tty β€” the tty to hangup. That's the whole assignment, bestie.

πŸŽ€ DESCRIPTION πŸŽ€

okay so the session leader is exiting and hanging up its controlling terminal. 🌸 Every process in the foreground process group is signalled SIGHUP β€” yep, the whole foreground process group, fr fr.

We do this synchronously so that when the syscall returns the process is complete. That guarantee is necessary for security reasons, so do not treat it like a cute optional vibe. It is literally the security-relevant part. Periodt. πŸ”₯

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/tty/tty_io.c is the home base 🏠, and these are the tty besties in the neighborhood:


kay bye bestie, this page comes from ./drivers/tty, dated October 2026, and it's tty_vhangup_session(9) signing off. πŸŽ€βœ¨

πŸ“¦ where this page comes from