ruby-changes:33817
From: nobu <ko1@a...>
Date: Sat, 10 May 2014 13:32:26 +0900 (JST)
Subject: [ruby-changes:33817] nobu:r45898 (trunk): thread_pthread.c: variable for errno
nobu 2014-05-10 13:32:10 +0900 (Sat, 10 May 2014) New Revision: 45898 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45898 Log: thread_pthread.c: variable for errno * thread_pthread.c (timer_thread_sleep): use a local variable for errno. Modified files: trunk/thread_pthread.c Index: thread_pthread.c =================================================================== --- thread_pthread.c (revision 45897) +++ thread_pthread.c (revision 45898) @@ -1389,13 +1389,14 @@ timer_thread_sleep(rb_global_vm_lock_t* https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L1389 consume_communication_pipe(timer_thread_pipe_low[0]); } else { /* result < 0 */ - 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: + 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", e); + default: /* ignore */; } } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/