From b9a13f4962333f08338b9839d1bd9151665ac8aa Mon Sep 17 00:00:00 2001 From: kosaki Date: Sun, 10 Jul 2011 08:29:46 +0000 Subject: * thread_pthread.c (mutex_debug): use exit(EXIT_FAILURE) instad of exit(1). * thread_pthread.c (add_signal_thread_list): ditto. * thread.c (rb_thread_call_with_gvl): ditto. * util.c (Bug): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread_pthread.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'thread_pthread.c') diff --git a/thread_pthread.c b/thread_pthread.c index b353a9e64c..0cdc220fba 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -170,9 +170,9 @@ mutex_debug(const char *msg, pthread_mutex_t *lock) int r; static pthread_mutex_t dbglock = PTHREAD_MUTEX_INITIALIZER; - if ((r = pthread_mutex_lock(&dbglock)) != 0) {exit(1);} + if ((r = pthread_mutex_lock(&dbglock)) != 0) {exit(EXIT_FAILURE);} fprintf(stdout, "%s: %p\n", msg, (void *)lock); - if ((r = pthread_mutex_unlock(&dbglock)) != 0) {exit(1);} + if ((r = pthread_mutex_unlock(&dbglock)) != 0) {exit(EXIT_FAILURE);} } } @@ -946,7 +946,7 @@ add_signal_thread_list(rb_thread_t *th) if (list == 0) { fprintf(stderr, "[FATAL] failed to allocate memory\n"); - exit(1); + exit(EXIT_FAILURE); } list->th = th; -- cgit v1.2.3