[前][次][番号順一覧][スレッド一覧]

ruby-changes:20446

From: kosaki <ko1@a...>
Date: Sun, 10 Jul 2011 17:29:59 +0900 (JST)
Subject: [ruby-changes:20446] kosaki:r32494 (trunk): * thread_pthread.c (mutex_debug): use exit(EXIT_FAILURE) instad of

kosaki	2011-07-10 17:29:46 +0900 (Sun, 10 Jul 2011)

  New Revision: 32494

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32494

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/thread.c
    trunk/thread_pthread.c
    trunk/util.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 32493)
+++ ChangeLog	(revision 32494)
@@ -1,3 +1,11 @@
+Sun Jul 10 17:28:01 2011  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* 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.
+
 Sun Jul 10 15:58:12 2011  NARUSE, Yui  <naruse@r...>
 
 	* ext/json: Merge json gem 1.5.4+ (f7f78896607b6f6226cd).
Index: thread_pthread.c
===================================================================
--- thread_pthread.c	(revision 32493)
+++ thread_pthread.c	(revision 32494)
@@ -170,9 +170,9 @@
 	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 @@
 
 	    if (list == 0) {
 		fprintf(stderr, "[FATAL] failed to allocate memory\n");
-		exit(1);
+		exit(EXIT_FAILURE);
 	    }
 
 	    list->th = th;
Index: thread.c
===================================================================
--- thread.c	(revision 32493)
+++ thread.c	(revision 32494)
@@ -1210,7 +1210,7 @@
 	 */
 
 	fprintf(stderr, "[BUG] rb_thread_call_with_gvl() is called by non-ruby thread\n");
-	exit(1);
+	exit(EXIT_FAILURE);
     }
 
     brb = (struct rb_blocking_region_buffer *)th->blocking_region_buffer;
Index: util.c
===================================================================
--- util.c	(revision 32493)
+++ util.c	(revision 32494)
@@ -837,7 +837,7 @@
 
 #ifdef DEBUG
 #include "stdio.h"
-#define Bug(x) {fprintf(stderr, "%s\n", (x)); exit(1);}
+#define Bug(x) {fprintf(stderr, "%s\n", (x)); exit(EXIT_FAILURE);}
 #endif
 
 #include "stdlib.h"

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]