kernel: fixup issues with timeouts in fswait3

This commit is contained in:
K. Lange 2023-02-16 16:09:20 +09:00
parent 33d38e0182
commit 3211306608
2 changed files with 2 additions and 2 deletions

View File

@ -1093,7 +1093,7 @@ int process_wait_nodes(process_t * process,fs_node_t * nodes[], int timeout) {
}
if (timeout == 0) {
return -2;
return index;
}
n = nodes;

View File

@ -1090,7 +1090,7 @@ long sys_fswait_multi(int c, int fds[], int timeout, int out[]) {
if (has_match != -1) return has_match;
int result = sys_fswait_timeout(c, fds, timeout);
if (result >= 0) out[result] = 1;
if (result >= 0 && result < c) out[result] = 1;
return result;
}