summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-11 08:49:23 (GMT)
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-11 08:49:23 (GMT)
commitb2056425185525afc30c4a8f97dff0229642107d (patch)
tree5c6925b79b3e09357984aa9495d36b094356eb7b /thread_pthread.c
parent23f4ba46de98d927abf19ac7bc8bb5257f789164 (diff)
thread_pthread: avoid redundant error message on pipe2() fail
Seeing one error for pipe creation is enough. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 29507a3..3f0ec2e 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -1335,7 +1335,7 @@ setup_communication_pipe_internal(int pipes[2])
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)
#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 */