Use linux.exit_group if not single threaded

This commit is contained in:
Shritesh Bhattarai 2019-03-26 16:44:48 -05:00 committed by Andrew Kelley
parent 5942797000
commit 85575704a4

View File

@ -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 => {