yutani: Don't raise new exception when fswait is interrupted

This commit is contained in:
K. Lange 2023-02-20 09:26:42 +09:00
parent 738631f0ae
commit 14994141c2
1 changed files with 3 additions and 1 deletions

View File

@ -1372,7 +1372,9 @@ KRK_Function(fswait) {
if (status < 0) {
int _errno = errno;
free(_results);
return krk_runtimeError(vm.exceptions->OSError, "%d: %s", status, strerror(_errno));
/* check if we were already raising a keyboard interrupt */
if (krk_currentThread.flags & (KRK_THREAD_HAS_EXCEPTION | KRK_THREAD_SIGNALLED)) return NONE_VAL();
return krk_runtimeError(vm.exceptions->OSError, "%s", strerror(_errno));
}
KrkTuple * output = krk_newTuple(count);