exit_group(2)

πŸ’… exit_group(2) β€” the "everybody out" system call πŸ’…

okay bestie, so this is a page from the System Calls Manual, and it's literally the drama queen of process shutdown. no cap. let's get into it ✨


πŸ¦‹ NAME πŸ¦‹

exit_group β€” exit all threads in a process

periodt. not one thread. not your fav thread. ALL of them.


πŸ“š LIBRARY πŸ“š

Standard C library (libc, -lc)

yes bestie, it lives in the classic libc πŸ’–


✨ SYNOPSIS ✨

#include <sys/syscall.h>       /* Definition of SYS_* constants */
#include <unistd.h>

[[noreturn]] void syscall(SYS_exit_group, int status);
🚨 Note: glibc provides no wrapper for exit_group(), necessitating the use of syscall(2). so yeah, you gotta go through syscall(2) yourself. it's giving "no shortcuts", iykyk 😭

🌸 DESCRIPTION 🌸

so what does it actually do? this system call terminates all threads in the calling process's thread group. that's it. that's the whole vibe. your whole little thread group? gone. bye. πŸ’€


πŸŽ€ RETURN VALUE πŸŽ€

it does not return. literally never comes back. not even a little. it's the main character walking out of the room and never looking back πŸ‘‘


πŸ‘‘ STANDARDS πŸ‘‘

Linux. that's it, that's the standard 🌈


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

Linux 2.5.35. vintage but iconic, fr fr ✨


πŸ’œ NOTES πŸ’œ

  • Since glibc 2.3, this is the system call invoked when the _exit(3) wrapper function is called. so like, when you call _exit(3), this is what's actually running underneath. sneaky little icon 🧚

πŸ”₯ SEE ALSO πŸ”₯


and that's the page, bestie!! go forth and exit your thread groups responsibly 🫢

this lil cutie came from the Linux man-pages 6.20, dated 2026-06-05. mwah, love that for us πŸ’–πŸŒΈπŸŽ€

πŸ“¦ 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