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:glibcprovides no wrapper forexit_group(), necessitating the use ofsyscall(2). so yeah, you gotta go throughsyscall(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
glibc2.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
- Copyright 2004, Andries E. Brouwer <aeb@cwi.nl>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms