diff options
-rw-r--r-- | shell/shell_common.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/shell/shell_common.c b/shell/shell_common.c index da157ea0e..7fb5f8c58 100644 --- a/shell/shell_common.c +++ b/shell/shell_common.c | |||
@@ -221,6 +221,10 @@ shell_builtin_read(struct builtin_read_params *params) | |||
221 | errno = 0; | 221 | errno = 0; |
222 | pfd[0].events = POLLIN; | 222 | pfd[0].events = POLLIN; |
223 | //TODO race with a signal arriving just before the poll! | 223 | //TODO race with a signal arriving just before the poll! |
224 | #if ENABLE_PLATFORM_MINGW32 | ||
225 | /* Don't poll if timeout is -1, it hurts performance. */ | ||
226 | if (timeout >= 0) | ||
227 | #endif | ||
224 | if (poll(pfd, 1, timeout) <= 0) { | 228 | if (poll(pfd, 1, timeout) <= 0) { |
225 | /* timed out, or EINTR */ | 229 | /* timed out, or EINTR */ |
226 | err = errno; | 230 | err = errno; |