kernel: fixup issues with timeouts in fswait3
This commit is contained in:
parent
33d38e0182
commit
3211306608
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user