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:
parent
ae29036196
commit
a46e21c86f
@ -1389,12 +1389,13 @@ timer_thread_sleep(rb_global_vm_lock_t* gvl)
|
|||||||
consume_communication_pipe(timer_thread_pipe_low[0]);
|
consume_communication_pipe(timer_thread_pipe_low[0]);
|
||||||
}
|
}
|
||||||
else { /* result < 0 */
|
else { /* result < 0 */
|
||||||
switch (errno) {
|
int e = errno;
|
||||||
|
switch (e) {
|
||||||
case EBADF:
|
case EBADF:
|
||||||
case EINVAL:
|
case EINVAL:
|
||||||
case ENOMEM: /* from Linux man */
|
case ENOMEM: /* from Linux man */
|
||||||
case EFAULT: /* from FreeBSD man */
|
case EFAULT: /* from FreeBSD man */
|
||||||
rb_async_bug_errno("thread_timer: select", errno);
|
rb_async_bug_errno("thread_timer: select", e);
|
||||||
default:
|
default:
|
||||||
/* ignore */;
|
/* ignore */;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user