* 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
This commit is contained in:
ko1 2011-06-30 10:11:45 +00:00
parent 9942e92ca6
commit fa2c1c75a9
2 changed files with 15 additions and 6 deletions

View File

@ -1,3 +1,9 @@
Thu Jun 30 19:09:19 2011 Koichi Sasada <ko1@atdot.net>
* thread_pthread.c (thread_timer): ignore unknown errno.
(we observed that select(2) was canceled by errno=514 on
boron == Linux/Xen environment)
Thu Jun 30 17:33:25 2011 Koichi Sasada <ko1@atdot.net> Thu Jun 30 17:33:25 2011 Koichi Sasada <ko1@atdot.net>
* ext/objspace/objspace.c (ObjectSpace.count_tdata_objects): * ext/objspace/objspace.c (ObjectSpace.count_tdata_objects):

View File

@ -1104,12 +1104,15 @@ thread_timer(void *p)
consume_communication_pipe(); consume_communication_pipe();
} }
else { /* result < 0 */ else { /* result < 0 */
if (errno == EINTR) { switch (errno) {
/* interrupted. ignore */ case EBADF:
} case EINVAL:
else { case ENOMEM: /* from Linux man */
rb_async_bug_errno("thread_timer: select", errno); case EFAULT: /* from FreeBSD man */
} rb_async_bug_errno("thread_timer: select", errno);
default:
/* ignore */;
}
} }
} }