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

ruby-changes:51737

From: normal <ko1@a...>
Date: Wed, 11 Jul 2018 17:49:28 +0900 (JST)
Subject: [ruby-changes:51737] normal:r63949 (trunk): thread_pthread: avoid redundant error message on pipe2() fail

normal	2018-07-11 17:49:23 +0900 (Wed, 11 Jul 2018)

  New Revision: 63949

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63949

  Log:
    thread_pthread: avoid redundant error message on pipe2() fail
    
    Seeing one error for pipe creation is enough.

  Modified files:
    trunk/thread_pthread.c
Index: thread_pthread.c
===================================================================
--- thread_pthread.c	(revision 63948)
+++ thread_pthread.c	(revision 63949)
@@ -1335,7 +1335,7 @@ setup_communication_pipe_internal(int pi https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L1335
 
     err = rb_cloexec_pipe(pipes);
     if (err != 0) {
-	rb_warn("Failed to create communication pipe for timer thread: %s",
+	rb_warn("pipe creation failed for timer: %s, scheduling broken",
 	        strerror(errno));
 	return -1;
     }
@@ -1593,11 +1593,7 @@ rb_thread_create_timer_thread(void) https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L1593
 
 #if TIMER_IMPL == TIMER_THREAD_SLEEPY
 	err = setup_communication_pipe();
-	if (err != 0) {
-	    rb_warn("pipe creation failed for timer: %s, scheduling broken",
-		    strerror(err));
-	    return;
-	}
+	if (err) return;
 #endif /* TIMER_THREAD_SLEEPY */
 
 	/* create timer thread */

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

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