[前][次][番号順一覧][スレッド一覧]

ruby-changes:36408

From: usa <ko1@a...>
Date: Wed, 19 Nov 2014 07:46:20 +0900 (JST)
Subject: [ruby-changes:36408] usa:r48489 (trunk): * win32/win32.c (rb_w32_write): should set the error of

usa	2014-11-19 07:46:13 +0900 (Wed, 19 Nov 2014)

  New Revision: 48489

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48489

  Log:
    * win32/win32.c (rb_w32_write): should set the error of
      GetOverlappedResult()'s, not WriteFile()'s (it's always
      ERROR_IO_PENDING, of course).

  Modified files:
    trunk/ChangeLog
    trunk/win32/win32.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48488)
+++ ChangeLog	(revision 48489)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Nov 19 07:45:11 2014  NAKAMURA Usaku  <usa@r...>
+
+	* 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@a...>
 
 	* gc.c (gc_record): add information for debug print.
Index: win32/win32.c
===================================================================
--- win32/win32.c	(revision 48488)
+++ win32/win32.c	(revision 48489)
@@ -6547,7 +6547,7 @@ rb_w32_write(int fd, const void *buf, si https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L6547
 
 	    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));

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]