authorgravatar for shritesh@shritesh.comShritesh Bhattarai <shritesh@shritesh.com> 2019-03-26 16:44:48-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-03-26 17:49:20-04:00
log85575704a4c1939f25414bc585a72bd940e85ceb
treea99bbf7562d103e068f3b8151879dfe75715dec3
parent5942797000936394a7ed68806df56c02ca5d2b44

Use linux.exit_group if not single threaded


1 files changed, 8 insertions(+), 1 deletions(-)

std/os.zig+8-1
......@@ -213,7 +213,14 @@ pub fn exit(status: u8) noreturn {
213213 c.exit(status);
214214 }
215215 switch (builtin.os) {
216 Os.linux, Os.macosx, Os.ios, Os.freebsd, Os.netbsd => {
216 Os.linux => {
217 if (builtin.single_threaded) {
218 linux.exit(status);
219 } else {
220 linux.exit_group(status);
221 }
222 },
223 Os.macosx, Os.ios, Os.freebsd, Os.netbsd => {
217224 posix.exit(status);
218225 },
219226 Os.windows => {