aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--thread_pthread.c15
2 files changed, 15 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 92c2fb0170..6d17a457d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
* ext/objspace/objspace.c (ObjectSpace.count_tdata_objects):
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 */;
+ }
}
}