zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 85575704a4c1939f25414bc585a72bd940e85ceb (tree)
parent 5942797000936394a7ed68806df56c02ca5d2b44
Author: Shritesh Bhattarai <shritesh@shritesh.com>
Date:   Tue, 26 Mar 2019 16:44:48 -0500

Use linux.exit_group if not single threaded

Diffstat:
Mstd/os.zig | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/std/os.zig b/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 => {