~sircmpwn/hare-dev

hare: rt+linux: Use exit_group v1 PROPOSED

Lassi Pulkkinen: 1
 rt+linux: Use exit_group

 1 files changed, 1 insertions(+), 1 deletions(-)
#933167 alpine.yml success
#933168 freebsd.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/hare-dev/patches/38660/mbox | git am -3
Learn more about email & git

[PATCH hare] rt+linux: Use exit_group Export this patch

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>
---
 rt/+linux/syscalls.ha | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rt/+linux/syscalls.ha b/rt/+linux/syscalls.ha
index ce99c1fd..6540163f 100644
--- 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) = {
-- 
2.38.1
hare/patches: SUCCESS in 1m42s

[rt+linux: Use exit_group][0] from [Lassi Pulkkinen][1]

[0]: https://lists.sr.ht/~sircmpwn/hare-dev/patches/38660
[1]: mailto:lassi@pulk.fi

✓ #933167 SUCCESS hare/patches/alpine.yml  https://builds.sr.ht/~sircmpwn/job/933167
✓ #933168 SUCCESS hare/patches/freebsd.yml https://builds.sr.ht/~sircmpwn/job/933168