From 2c2a6e0c2b922eb576a706fcb0a1592238790a94 Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 21 May 2002 05:41:01 +0000 Subject: [PATCH] * eval.c (rb_thread_schedule): need to preserve errno before calling rb_trap_exec(). * regex.c (calculate_must_string): a bug in charset/charset_not parsing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ eval.c | 6 ++++-- regex.c | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 862ada4704..00b38b255d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,14 @@ Thu May 16 15:14:48 2002 WATANABE Hirofumi * djgpp/config.hin, djgpp/config.sed: catch up with the latest change. +Wed May 15 06:13:35 2002 Yukihiro Matsumoto + + * eval.c (rb_thread_schedule): need to preserve errno before + calling rb_trap_exec(). + + * regex.c (calculate_must_string): a bug in charset/charset_not + parsing. + Tue May 14 14:49:05 2002 WATANABE Hirofumi * gc.c (is_pointer_to_heap): avoid GCC 3.1 warnings. diff --git a/eval.c b/eval.c index 11d6a81797..93cb0151b2 100644 --- a/eval.c +++ b/eval.c @@ -7638,10 +7638,12 @@ rb_thread_schedule() n = select(max+1, &readfds, &writefds, &exceptfds, delay_ptr); if (n < 0) { + int e = errno; + if (rb_trap_pending) rb_trap_exec(); - if (errno == EINTR) goto again; + if (e == EINTR) goto again; #ifdef ERESTART - if (errno == ERESTART) goto again; + if (e == ERESTART) goto again; #endif FOREACH_THREAD_FROM(curr, th) { if (th->wait_for & WAIT_SELECT) { diff --git a/regex.c b/regex.c index 1961f68d28..f825f7ba07 100644 --- a/regex.c +++ b/regex.c @@ -1045,7 +1045,7 @@ calculate_must_string(start, end) p += mcnt; mcnt = EXTRACT_UNSIGNED_AND_INCR(p); while (mcnt--) { - p += 4; + p += 8; } break;