mirror of
https://github.com/ziglang/zig.git
synced 2026-01-22 07:15:25 +00:00
Use linux.exit_group if not single threaded
This commit is contained in:
parent
5942797000
commit
85575704a4
@ -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 => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user