From: Eric Wong Date: 2011-06-29T06:00:46+09:00 Subject: [ruby-core:37647] Re: [Request for Comment] avoid timer thread SASADA Koichi wrote: > (2011/06/29 5:26), Eric Wong wrote: > > Eric Wong wrote: > >> I think rb_bug_errno() is unsafe to call inside both thread_timer() and > >> rb_thread_wakeup_timer_thread() functions and it's putting me > >> on the wrong path while debugging. > > > > Maybe something along the lines of: > > http://bogomips.org/ruby.git/commit/?h=async-signal-safety&id=ce58589bd > > Thank you. In fact, I'm not care about error message because it is not > used in standard path. > > I'll commit your patch. Thanks again. No problem! Thanks for paying attention to this :) One small patch on top of it to remove strerror() since it may call malloc() on glibc: http://bogomips.org/ruby.git/commit/?h=async-signal-safety&id=78ab32fa Technically strlen() isn't listed as async-signal safe, either, but I don't think any implementation would use system calls for it... -- Eric Wong