From 0cdfbc9446d65959dc24b82e38b3cb5d6f9d825f Mon Sep 17 00:00:00 2001 From: ko1 Date: Sun, 7 Jun 2009 23:59:58 +0000 Subject: [PATCH] * thread_pthread.c (rb_thread_create_timer_thread): print fatal error message to stderr instead of using rb_bug(). * KNOWNBUGS.rb, bootstraptest/test_fork.rb: move a fixed test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ KNOWNBUGS.rb | 6 ------ bootstraptest/test_fork.rb | 6 ++++++ thread_pthread.c | 3 ++- version.h | 4 ++-- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index aeaf9c2b68..dd8cb6a0c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Mon Jun 8 05:07:41 2009 Koichi Sasada + + * thread_pthread.c (rb_thread_create_timer_thread): print fatal error + message to stderr instead of using rb_bug(). + + * KNOWNBUGS.rb, bootstraptest/test_fork.rb: move a fixed test. + Sun Jun 7 22:44:20 2009 Tadayoshi Funaba * lib/cmath.rb (log): avoided redundant expression. diff --git a/KNOWNBUGS.rb b/KNOWNBUGS.rb index 9fe4c29cf5..b97a08d928 100644 --- a/KNOWNBUGS.rb +++ b/KNOWNBUGS.rb @@ -3,9 +3,3 @@ # So all tests will cause failure. # -assert_normal_exit(<<'End', '[ruby-dev:37934]') - Thread.new { sleep 1; Thread.kill Thread.main } - Process.setrlimit(:NPROC, 1) - fork {} -End - diff --git a/bootstraptest/test_fork.rb b/bootstraptest/test_fork.rb index c6b1b71a60..60a74e8a22 100644 --- a/bootstraptest/test_fork.rb +++ b/bootstraptest/test_fork.rb @@ -20,3 +20,9 @@ assert_finish 10, %q{ rescue NotImplementedError end }, '[ruby-core:22158]' + +assert_normal_exit(<<'End', '[ruby-dev:37934]') + Thread.new { sleep 1; Thread.kill Thread.main } + Process.setrlimit(:NPROC, 1) + fork {} +End diff --git a/thread_pthread.c b/thread_pthread.c index 57a032f679..a4e7f25d75 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -797,7 +797,8 @@ rb_thread_create_timer_thread(void) err = pthread_create(&timer_thread_id, &attr, thread_timer, 0); if (err != 0) { native_mutex_unlock(&timer_thread_lock); - rb_bug("rb_thread_create_timer_thread: return non-zero (%d)", err); + fprintf(stderr, "[FATAL] Failed to create timer thread (errno: %d)\n", err); + exit(EXIT_FAILURE); } native_cond_wait(&timer_thread_cond, &timer_thread_lock); native_mutex_unlock(&timer_thread_lock); diff --git a/version.h b/version.h index 80b5ebf1b6..2941fb196a 100644 --- a/version.h +++ b/version.h @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_RELEASE_DATE "2009-06-07" +#define RUBY_RELEASE_DATE "2009-06-08" #define RUBY_PATCHLEVEL -1 #define RUBY_BRANCH_NAME "trunk" @@ -8,7 +8,7 @@ #define RUBY_VERSION_TEENY 1 #define RUBY_RELEASE_YEAR 2009 #define RUBY_RELEASE_MONTH 6 -#define RUBY_RELEASE_DAY 7 +#define RUBY_RELEASE_DAY 8 #include "ruby/version.h"