commit 5c38d763a4f14823ea8efeeb28068a8542737ace
parent a3ce0eca32d2c5570034530fe2f7d5c49b8c1c8f
Author: Lassi Pulkkinen <lassi@pulk.fi>
Date: Thu, 2 Feb 2023 17:04:05 +0200
rt+linux: Use exit_group
Fixes hang after os::exit() in some multithreaded scenarios, such as
when using SDL.
Both glibc and musl implement _exit this way.
Signed-off-by: Lassi Pulkkinen <lassi@pulk.fi>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rt/+linux/syscalls.ha b/rt/+linux/syscalls.ha
@@ -276,7 +276,7 @@ export fn sendfile(
out: u64, in: u64, offs: uintptr: u64, count: u64))?: size;
export @noreturn fn exit(status: int) void = {
- syscall1(SYS_exit, status: u64);
+ syscall1(SYS_exit_group, status: u64);
};
export fn kill(pid: int, signal: int) (void | errno) = {