aboutsummaryrefslogtreecommitdiffstats
path: root/thread_pthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c15
1 files changed, 9 insertions, 6 deletions
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 */;
+ }
}
}