diff options
author | hpa <hpa> | 2004-12-20 22:28:30 +0000 |
---|---|---|
committer | hpa <hpa> | 2004-12-20 22:28:30 +0000 |
commit | 27007ae32a1244db12ba1e8e12352785075010a1 (patch) | |
tree | 39fc9205d1802525778e58db95ad853ee4678d01 /com32/lib/fread.c | |
parent | f22543d9d32c3866b6d42392c2957c6c76098964 (diff) | |
download | syslinux-27007ae32a1244db12ba1e8e12352785075010a1.tar.gz |
Make the raw input console non-blocking with a timeout, allows handling
the [Esc] key.
Diffstat (limited to 'com32/lib/fread.c')
-rw-r--r-- | com32/lib/fread.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/com32/lib/fread.c b/com32/lib/fread.c index 8f7dba9c..76fdda8c 100644 --- a/com32/lib/fread.c +++ b/com32/lib/fread.c @@ -15,7 +15,7 @@ size_t _fread(void *buf, size_t count, FILE *f) while ( count ) { rv = read(fileno(f), p, count); if ( rv == -1 ) { - if ( errno == EINTR ) + if ( errno == EINTR || errno == EAGAIN ) continue; else break; @@ -30,6 +30,3 @@ size_t _fread(void *buf, size_t count, FILE *f) return bytes; } - - - |