* io.c (rb_io_fread): return already read data when system call is
interrupted. [ruby-talk:97206] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d7861f7446
commit
2f978ec25a
@ -1,3 +1,8 @@
|
|||||||
|
Thu Jun 24 14:23:29 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* io.c (rb_io_fread): return already read data when system call is
|
||||||
|
interrupted. [ruby-talk:97206]
|
||||||
|
|
||||||
Thu Jun 24 01:25:21 2004 Shugo Maeda <shugo@ruby-lang.org>
|
Thu Jun 24 01:25:21 2004 Shugo Maeda <shugo@ruby-lang.org>
|
||||||
|
|
||||||
* version.h: added declarations of ruby_version,
|
* version.h: added declarations of ruby_version,
|
||||||
|
5
io.c
5
io.c
@ -956,12 +956,11 @@ rb_io_fread(ptr, len, f)
|
|||||||
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
|
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
|
||||||
case EWOULDBLOCK:
|
case EWOULDBLOCK:
|
||||||
#endif
|
#endif
|
||||||
if (len - n >= 0) {
|
if (len > n) {
|
||||||
clearerr(f);
|
clearerr(f);
|
||||||
return len - n;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
if (len == n) return 0;
|
||||||
}
|
}
|
||||||
*ptr = '\0';
|
*ptr = '\0';
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user