id_t(3type)

✨ id_t(3type) ✨

okay so bestie, welcome to id_t(3type) πŸ’– this is the little page about all the "who even are you" types β€” the ones that hold every ID the kernel ever asks about. no cap, it's foundational.


πŸŽ€ NAME πŸŽ€

pid_t, uid_t, gid_t, id_t β€” process/user/group identifier πŸ’…

πŸ“š LIBRARY πŸ“š

Standard C library (libc) 🫢


✨ SYNOPSIS ✨

#include <sys/types.h>

typedef /* ... */ pid_t;
typedef /* ... */ uid_t;
typedef /* ... */ gid_t;
typedef /* ... */ id_t;

yes bestie, that's literally all you need β€” one include and boom, four types πŸ’– (the /* ... */ is real, the actual underlying type is left as a mystery on purpose, so don't come for me)


πŸ’œ DESCRIPTION πŸ’œ

  • pid_t β€” this one holds process IDs, process group IDs, and session IDs. it's a signed integer type, so it's giving "I can go negative if I'm feeling spicy" ✨
  • uid_t β€” the type that carries user IDs. it's an integer type, periodt 🌸
  • gid_t β€” the type that carries group IDs. also an integer type πŸŽ€
  • id_t β€” the main character of this page πŸ‘‘ it's a general identifier type. it's an integer type, and it's wide/loose enough to hold a pid_t, a uid_t, or a gid_t inside it. it's giving "one type to rule them all" πŸ¦‹

🌈 STANDARDS 🌈

POSIX.1-2024. πŸ’…


πŸ•°οΈ HISTORY πŸ•°οΈ

  • pid_t
  • uid_t
  • gid_t

β†’ all three: POSIX.1-1988. the OGs fr fr 🌸

  • id_t β†’ SUSv1, POSIX.1-2001 XSI, POSIX.1-2008. it arrived later and lowkey ate ✨

πŸ“ NOTES πŸ“

y'all β€” the tea is that <sys/types.h> is not the only place these types show up. lots of other headers also hand them to you, so here's the full receipts list 🧾

pid_t also comes from these besties:

<fcntl.h>, <sched.h>, <signal.h>, <spawn.h>, <sys/msg.h>, <sys/sem.h>, <sys/shm.h>, <sys/wait.h>, <termios.h>, <time.h>, <unistd.h>, and <utmpx.h>.

uid_t also comes from:

<pwd.h>, <signal.h>, <stropts.h>, <sys/ipc.h>, <sys/stat.h>, and <unistd.h>.

gid_t also comes from:

<grp.h>, <pwd.h>, <signal.h>, <stropts.h>, <sys/ipc.h>, <sys/stat.h>, and <unistd.h>.

and id_t also comes from:

<sys/resource.h>.

ok so quick vibe check: <sys/resource.h> is the only extra one for id_t, while pid_t has a whole squad. iconic behavior honestly πŸ’€

πŸ‘€ SEE ALSO πŸ‘€

chown(2), fork(2), getegid(2), geteuid(2), getgid(2), getgroups(2), getpgid(2), getpid(2), getppid(2), getpriority(2), getpwnam(3), getresgid(2), getresuid(2), getsid(2), gettid(2), getuid(2), kill(2), pidfd_open(2), sched_setscheduler(2), waitid(2), getgrnam(3), sigqueue(3), credentials(7)

go read credentials(7) if you wanna understand the whole permissions vibe iykyk πŸ”₯


🏁 and that's the page bestie!! this one's from Linux man-pages 6.20, dated 2026-02-08 πŸ’– now go forth and getpid() responsibly, ily, bye!! βœ¨πŸ’…πŸ«Ά
πŸ“¦ where this page comes from
  • arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • πŸ“œ the page's license: Linux-man-pages-copyleft
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms