__proc_set_tty(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– __proc_set_tty(9) πŸ’–

✨ NAME ✨

okay bestie, straight from the Kernel API Manual: __proc_set_tty β€” set the controlling terminal. periodt πŸ‘‘.

πŸŽ€ SYNOPSIS πŸŽ€

void __proc_set_tty (struct tty_struct *tty );

πŸ’… ARGUMENTS πŸ’…

  • tty β€” tty structure. that's the whole argument, bestie 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so check it: this is Only callable by the session leader and only if it does not already have a controlling terminal. like, it's giving exclusive club energy, no cap πŸ’….

Caller must hold:

  • tty_lock
  • a readlock on tasklist_lock
  • sighand lock

no cap, all of that before you even think about sliding into this call 😭.

🌈 SEE ALSO 🌈


mwah πŸ’‹ sign-off time: source/version is ./drivers/tty, the date is October 2026, and the page is __proc_set_tty(9). that's the footer, bestie, slay πŸŽ€βœ¨

πŸ“¦ where this page comes from