thread_pthread.c: variable for errno

* thread_pthread.c (timer_thread_sleep): use a local variable for
  errno.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-05-10 04:32:10 +00:00
parent ae29036196
commit a46e21c86f

View File

@ -1389,12 +1389,13 @@ timer_thread_sleep(rb_global_vm_lock_t* gvl)
consume_communication_pipe(timer_thread_pipe_low[0]);
}
else { /* result < 0 */
switch (errno) {
int e = errno;
switch (e) {
case EBADF:
case EINVAL:
case ENOMEM: /* from Linux man */
case EFAULT: /* from FreeBSD man */
rb_async_bug_errno("thread_timer: select", errno);
rb_async_bug_errno("thread_timer: select", e);
default:
/* ignore */;
}