tiocgsid(9)
β¨ NAME β¨
okay bestie, this is tiocgsid(9) from the Kernel API Manual β the function whose whole entire job is get session id. no cap, thatβs the vibe. π
πΈ SYNOPSIS πΈ
int tiocgsid (struct tty_struct *tty , struct tty_struct *real_tty ,
pid_t __user *p );
π ARGUMENTS π
ttyβ the tty passed by user. yes, the one the user handed over.real_ttyβ the tty side of the tty passed by the user if itβs a pty; otherwise itβs just the tty. π¦pβ pointer to returned session id. like, the spot where the returned session id goes.
π¦ DESCRIPTION π¦
This one obtains the session id of the tty. If there is no session, it returns an error β periodt. Thatβs the whole plot, bestie; no extra lore needed. π
π SEE ALSO π
Kernel file: ./drivers/tty/tty_jobctrl.c. the related icon crew is:
__tty_check_change(9)__proc_set_tty(9)tty_signal_session_leader(9)disassociate_ctty(9)tiocsctty(9)tty_get_pgrp(9)tiocgpgrp(9)tiocspgrp(9)
mwah π this pageβs source/version tag is ./drivers/tty, dated October 2026, and yes itβs still tiocgsid(9) β periodt. π«Ά
π¦ 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