n_tty_close(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– n_tty_close(9) β€” Kernel API Manual, section 9 πŸ’–

okay so hi bestie 🫢 welcome to the Kernel API Manual (section 9, where the kernel girlies live), and today's main character is n_tty_close(9). she's short, she's iconic, and she's literally the shutdown bestie for a tty line discipline. let's get into it πŸ’…


πŸŽ€ NAME πŸŽ€

n_tty_close β€” close the ldisc for this tty ✨

🌸 SYNOPSIS 🌸

void n_tty_close (struct tty_struct *tty );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • tty β€” the device, bestie. that's the whole vibe. πŸŽ€

πŸ’œ DESCRIPTION πŸ’œ

okay so the terminal layer calls this function when this line discipline is being shut down β€” either because of a close or because of a discipline change. it's giving "packing up and leaving the group chat" energy, ngl. πŸ’€

and the important part, fr fr: this function will not be called while other ldisc methods are in progress. so no overlapping chaos, no "not me interrupting your syscall" moment. the kernel said boundaries, periodt. πŸ‘‘

πŸ”₯ SEE ALSO πŸ”₯

kernel file ./drivers/tty/n_tty.c, plus the whole friend group:


mwah πŸ’‹ that's the whole page! source/version vibes live at ./drivers/tty, dated October 2026, straight from the Kernel API Manual, section 9. bye bestie 🫢✨

πŸ“¦ where this page comes from