From 26b430bee79a0fe1c4dca235fdac45bd6f1b76df Mon Sep 17 00:00:00 2001 From: Itamar Date: Wed, 14 Oct 2020 21:47:19 +0300 Subject: [PATCH] Kernel: Fix sys$join_thread Previously, when we unblocked because the joinee has died, we didn't copy its exit value back to the user. --- Kernel/Syscalls/thread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Syscalls/thread.cpp b/Kernel/Syscalls/thread.cpp index 88b05b6aa5..b4059a8878 100644 --- a/Kernel/Syscalls/thread.cpp +++ b/Kernel/Syscalls/thread.cpp @@ -137,7 +137,7 @@ int Process::sys$join_thread(pid_t tid, Userspace exit_value) break; } if (result == Thread::BlockResult::InterruptedByDeath) - return 0; // we're not going to return back to user mode + break; } if (exit_value && !copy_to_user(exit_value, &joinee_exit_value))