From 297231bb3602d868d3891d357026c53f9fcc2402 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Tue, 26 Mar 2024 11:40:39 +0100 Subject: Increase support for signals --- kernel/cpu/syscall.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'kernel/cpu') diff --git a/kernel/cpu/syscall.c b/kernel/cpu/syscall.c index 7734f4e..d47f858 100644 --- a/kernel/cpu/syscall.c +++ b/kernel/cpu/syscall.c @@ -87,9 +87,17 @@ void syscall_wait(int *status) { return; } do { + current_task->is_halted = 1; current_task->halts[WAIT_CHILD_HALT] = 1; switch_task(); + if (current_task->is_interrupted) { + break; + } } while (current_task->halts[WAIT_CHILD_HALT]); + if (current_task->is_interrupted) { + current_task->is_interrupted = 0; + return; + } if (status) { *status = current_task->child_rc; } -- cgit v1.2.3