summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--io.c5
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index b4c71c5..4784fe5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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:32:43 2004 Shugo Maeda <shugo@ruby-lang.org>
* version.h: added declarations of ruby_version,
@@ -12,7 +17,7 @@ Wed Jun 23 22:23:37 2004 Dave Thomas <dave@pragprog.com>
Wed Jun 23 01:45:27 2004 Dave Thomas <dave@pragprog.com>
- * lib/rdoc/parsers/parse_rb.rb (RubyLex::identify_quotation):
+ * lib/rdoc/parsers/parse_rb.rb (RubyLex::identify_quotation):
Fix problem with the 'r' being dropped from %r{xxx}
Wed Jun 23 00:20:20 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
diff --git a/io.c b/io.c
index 24fad23..b30b489 100644
--- a/io.c
+++ b/io.c
@@ -936,12 +936,11 @@ rb_io_fread(ptr, len, f)
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
case EWOULDBLOCK:
#endif
- if (len - n >= 0) {
+ if (len > n) {
clearerr(f);
- return len - n;
}
}
- return 0;
+ if (len == n) return 0;
}
*ptr = '\0';
break;