summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index ece432f0b0..761014057e 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -4353,7 +4353,7 @@ rb_w32_read(int fd, void *buf, size_t size)
if (err != ERROR_IO_PENDING) {
if (err == ERROR_ACCESS_DENIED)
errno = EBADF;
- else if (err == ERROR_BROKEN_PIPE) {
+ else if (err == ERROR_BROKEN_PIPE || err == ERROR_HANDLE_EOF) {
MTHREAD_ONLY(LeaveCriticalSection(&_pioinfo(fd)->lock));
return 0;
}