From: nahi Date: 2012-03-18T15:39:53+09:00 Subject: [ruby-core:43400] [ruby-trunk - Feature #3206] Problems manipulating the signal mask with Ruby Issue #3206 has been updated by nahi. Description updated Assignee set to ko1 ---------------------------------------- Feature #3206: Problems manipulating the signal mask with Ruby https://bugs.ruby-lang.org/issues/3206#change-24710 Author: Spakman Status: Open Priority: Normal Assignee: ko1 Category: core Target version: =begin The futex timer thread inherits the (nearly empty) signal mask from the main thread when it is created. I've written a little Ruby library that executes sigprocmask/pthread_sigmask using FFI. However, my Ruby program isn't able to block signals since they are instead delivered to the timer thread. Also, calls to rb_enable_interrupt() unmask all signal types. Instead, I'd like Ruby to remember the signal mask I have set. The attached patch, against 1.9.1-p376, makes rb_disable_interrupt() save the old signal mask for rb_enable_interrupt() to use as well as masking all signals as soon as the timer thread is created. Finally, it removes the call to rb_trap_restore_mask() from rb_longjmp() - this appeared to be unnecessary. Is it? My testing hasn't shown any problems with this, but I'd love to hear any thoughts about this. =end -- http://bugs.ruby-lang.org/