* win32/win32.c (rb_w32_read): read only 1 byte at once on console.
workaround of Windows bug. see [ruby-core:33460]. this is not the final solution. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
80c21e35cb
commit
e4288860d8
@ -1,3 +1,9 @@
|
|||||||
|
Tue Nov 30 12:23:52 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* win32/win32.c (rb_w32_read): read only 1 byte at once on console.
|
||||||
|
workaround of Windows bug. see [ruby-core:33460].
|
||||||
|
this is not the final solution.
|
||||||
|
|
||||||
Tue Nov 30 11:39:13 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
Tue Nov 30 11:39:13 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* lib/net/http.rb: improve rdoc.
|
* lib/net/http.rb: improve rdoc.
|
||||||
|
@ -5027,6 +5027,7 @@ rb_w32_read(int fd, void *buf, size_t size)
|
|||||||
size_t len;
|
size_t len;
|
||||||
size_t ret;
|
size_t ret;
|
||||||
OVERLAPPED ol, *pol = NULL;
|
OVERLAPPED ol, *pol = NULL;
|
||||||
|
BOOL isconsole;
|
||||||
int start = 0;
|
int start = 0;
|
||||||
|
|
||||||
if (is_socket(sock))
|
if (is_socket(sock))
|
||||||
@ -5049,11 +5050,12 @@ rb_w32_read(int fd, void *buf, size_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
isconsole = is_console(_osfhnd(fd));
|
||||||
retry:
|
retry:
|
||||||
/* get rid of console reading bug */
|
/* get rid of console reading bug */
|
||||||
if (is_console(_osfhnd(fd))) {
|
if (isconsole) {
|
||||||
if (start)
|
if (start)
|
||||||
len = min(16 * 1024, size);
|
len = 1;
|
||||||
else {
|
else {
|
||||||
len = 0;
|
len = 0;
|
||||||
start = 1;
|
start = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user