Commit 85575704a4

Shritesh Bhattarai <shritesh@shritesh.com>
2019-03-26 22:44:48
Use linux.exit_group if not single threaded
1 parent 5942797
Changed files (1)
std
std/os.zig
@@ -213,7 +213,14 @@ pub fn exit(status: u8) noreturn {
         c.exit(status);
     }
     switch (builtin.os) {
-        Os.linux, Os.macosx, Os.ios, Os.freebsd, Os.netbsd => {
+        Os.linux => {
+            if (builtin.single_threaded) {
+                linux.exit(status);
+            } else {
+                linux.exit_group(status);
+            }
+        },
+        Os.macosx, Os.ios, Os.freebsd, Os.netbsd => {
             posix.exit(status);
         },
         Os.windows => {