1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
usa 2014-11-18 22:46:13 +00:00
parent 43a5972a3e
commit 56d8b8701d
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
Wed Nov 19 07:45:11 2014 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (rb_w32_write): should set the error of
GetOverlappedResult()'s, not WriteFile()'s (it's always
ERROR_IO_PENDING, of course).
Tue Nov 18 14:16:47 2014 Koichi Sasada <ko1@atdot.net>
* gc.c (gc_record): add information for debug print.

View file

@ -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));