diff options
-rw-r--r-- | os/inputthread.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/os/inputthread.c b/os/inputthread.c index 1a7967bd0..9d0397280 100644 --- a/os/inputthread.c +++ b/os/inputthread.c @@ -106,20 +106,17 @@ WaitForInput(void* argument) i = Select(MaxInputDevices, &ReadyInputDevices, NULL, NULL, NULL); DebugF("inputthread: WaitForInput() awakening from Select()\n"); - if (i <= 0) /* An error or timeout occurred */ + if (i < 0) /* An error occurred */ { - if (i < 0) /* This logic are stolen from WaitFor.c */ + if (errno == EINVAL) { - if (errno == EINVAL) - { - FatalError("WaitForInput(): select: %s\n", - strerror(errno)); - } - else if (errno != EINTR && errno != EAGAIN) - { - ErrorF("WaitForInput(): select: %s\n", - strerror(errno)); - } + FatalError("WaitForInput(): select: %s\n", + strerror(errno)); + } + else if (errno != EINTR && errno != EAGAIN) + { + ErrorF("WaitForInput(): select: %s\n", + strerror(errno)); } } |