From fa2c1c75a9ef0c9a9b35a56108ef6d2ea84717e5 Mon Sep 17 00:00:00 2001 From: ko1 Date: Thu, 30 Jun 2011 10:11:45 +0000 Subject: * thread_pthread.c (thread_timer): ignore unknown errno. (we observed that select(2) was canceled by errno=514 on boron == Linux/Xen environment) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread_pthread.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'thread_pthread.c') diff --git a/thread_pthread.c b/thread_pthread.c index eeddd507eb..4f66c4e2cf 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -1104,12 +1104,15 @@ thread_timer(void *p) consume_communication_pipe(); } else { /* result < 0 */ - if (errno == EINTR) { - /* interrupted. ignore */ - } - else { - rb_async_bug_errno("thread_timer: select", errno); - } + switch (errno) { + case EBADF: + case EINVAL: + case ENOMEM: /* from Linux man */ + case EFAULT: /* from FreeBSD man */ + rb_async_bug_errno("thread_timer: select", errno); + default: + /* ignore */; + } } } -- cgit v1.2.1