summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-18 22:46:13 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-18 22:46:13 +0000
commit56d8b8701df75d7bd8b0c402c624f38c56385c92 (patch)
tree17becd699e354c7906f5e5cfbcc10119f18e7b3c /win32/win32.c
parent43a5972a3e85c6a5f5eed0cc5bb833d4ec9dfe24 (diff)
* win32/win32.c (rb_w32_write): should set the error of
GetOverlappedResult()'s, not WriteFile()'s (it's always ERROR_IO_PENDING, of course). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 325954e..b54ab74 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -6547,7 +6547,7 @@ rb_w32_write(int fd, const void *buf, size_t size)
if (!GetOverlappedResult((HANDLE)_osfhnd(fd), &ol, &written,
TRUE)) {
- errno = map_errno(err);
+ errno = map_errno(GetLastError());
CloseHandle(ol.hEvent);
cancel_io((HANDLE)_osfhnd(fd));
MTHREAD_ONLY(LeaveCriticalSection(&_pioinfo(fd)->lock));