TFIND(9)
π¦ TFIND(9) β Kernel Developerβs Manual, but make it bestie-core π¦
okay so this is the tfind(9) page from the Kernel Developerβs Manual, and weβre about to make thread/process/process-group lookups make sense. no cap. π
πΈ NAME πΈ
tfind, prfind, pgfind β find thread, process and process group by number, bestie. π
β¨ SYNOPSIS β¨
#include <sys/types.h>
#include <sys/signal.h>
#include <sys/proc.h>
struct proc *
tfind(pid_t tid);
struct process *
prfind(pid_t pid);
struct pgrp *
pgfind(pid_t pgid);
π DESCRIPTION π
okay so these three functions are your little lookup besties: tfind(), prfind(), and pgfind() retrieve thread, process and process group structures from thread, process and process group IDs, respectively. π«Ά
so like: tfind() is giving thread-structure-by-tid, prfind() is giving process-structure-by-pid, and pgfind() is giving process-group-structure-by-pgid. iconic mapping, fr fr. π
and if the requested ID canβt be found? these functions return NULL. thatβs the vibe check result: not found, bestie. π
π₯ CODE REFERENCES π₯
those functions are implemented in the file sys/kern/kern_proc.c. go peek if you want the lore. π
mwah π β source/version: Debian; date: June 13, 2025. bye bestie π«Άβ¨
π¦ where this page comes from
- nixpkgs unstable: cvs-export
- Copyright (c) 1999 Marc Espie
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms