* win32/win32.c (rb_w32_read, rb_w32_write): more accurate handling
of wait result. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d4afbe49f3
commit
d2d37173e7
@ -1,3 +1,8 @@
|
|||||||
|
Fri Aug 29 04:47:49 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* win32/win32.c (rb_w32_read, rb_w32_write): more accurate handling
|
||||||
|
of wait result.
|
||||||
|
|
||||||
Fri Aug 29 02:59:35 2008 Tanaka Akira <akr@fsij.org>
|
Fri Aug 29 02:59:35 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* transcode.c (econv_finish): new method.
|
* transcode.c (econv_finish): new method.
|
||||||
|
@ -4367,7 +4367,9 @@ rb_w32_read(int fd, void *buf, size_t size)
|
|||||||
if (pol) {
|
if (pol) {
|
||||||
wait = rb_w32_wait_events_blocking(&ol.hEvent, 1, INFINITE);
|
wait = rb_w32_wait_events_blocking(&ol.hEvent, 1, INFINITE);
|
||||||
if (wait != WAIT_OBJECT_0) {
|
if (wait != WAIT_OBJECT_0) {
|
||||||
if (errno != EINTR)
|
if (wait == WAIT_OBJECT_0 + 1)
|
||||||
|
errno = EINTR;
|
||||||
|
else
|
||||||
errno = map_errno(GetLastError());
|
errno = map_errno(GetLastError());
|
||||||
CloseHandle(ol.hEvent);
|
CloseHandle(ol.hEvent);
|
||||||
cancel_io((HANDLE)_osfhnd(fd));
|
cancel_io((HANDLE)_osfhnd(fd));
|
||||||
@ -4471,7 +4473,9 @@ rb_w32_write(int fd, const void *buf, size_t size)
|
|||||||
if (pol) {
|
if (pol) {
|
||||||
wait = rb_w32_wait_events_blocking(&ol.hEvent, 1, INFINITE);
|
wait = rb_w32_wait_events_blocking(&ol.hEvent, 1, INFINITE);
|
||||||
if (wait != WAIT_OBJECT_0) {
|
if (wait != WAIT_OBJECT_0) {
|
||||||
if (errno != EINTR)
|
if (wait == WAIT_OBJECT_0 + 1)
|
||||||
|
errno = EINTR;
|
||||||
|
else
|
||||||
errno = map_errno(GetLastError());
|
errno = map_errno(GetLastError());
|
||||||
CloseHandle(ol.hEvent);
|
CloseHandle(ol.hEvent);
|
||||||
cancel_io((HANDLE)_osfhnd(fd));
|
cancel_io((HANDLE)_osfhnd(fd));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user