- `wait(timeval)` will now throw a `SnoozeError` when the `select(fd*, fd*, fd*, timeval)` returns `-1`
This commit is contained in:
Tristan B. Velloza Kildaire 2023-02-26 17:31:39 +02:00
parent 00ea389d4a
commit 593f7f44db
1 changed files with 6 additions and 0 deletions

View File

@ -136,6 +136,12 @@ public class Event
return false;
}
// TODO: Check the -1 case
/* On error */
else if(status == -1)
{
throw new SnoozeError("Error selecting pipe fd '"~to!(string)(readFD)~"' when trying to wait()");
}
/* On success */
else
{
// TODO: Perform read now to clear sttaus for next wait()