From 738631f0ae6e038912dc4f2ac9afee43e4e65b88 Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Mon, 20 Feb 2023 09:25:52 +0900 Subject: [PATCH] kernel: Interrupting fswait should return -EINTR --- kernel/sys/process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sys/process.c b/kernel/sys/process.c index c211fddd..b853eb95 100644 --- a/kernel/sys/process.c +++ b/kernel/sys/process.c @@ -1082,7 +1082,7 @@ int process_wait_nodes(process_t * process,fs_node_t * nodes[], int timeout) { do { int result = selectcheck_fs(*n); if (result < 0) { - return -1; + return -EBADF; } if (result == 0) { return index; @@ -1153,7 +1153,7 @@ void process_awaken_signal(process_t * process) { spin_lock(sleep_lock); spin_lock(process->sched_lock); if (process->node_waits) { - process_awaken_from_fswait(process, -1); + process_awaken_from_fswait(process, -EINTR); } else { spin_unlock(process->sched_lock); }