Project

General

Profile

Feature #3206 ยป mask_signals_properly_ruby_191.patch

Spakman (Mark Somerville), 04/27/2010 08:03 PM

View differences:

../ruby-1.9.1-p376/eval.c 2010-04-27 10:42:47.523343490 +0100
}
}
rb_trap_restore_mask();
if (tag != TAG_FATAL) {
EXEC_EVENT_HOOK(th, RUBY_EVENT_RAISE, th->cfp->self,
0 /* TODO: id */, 0 /* TODO: klass */);
../ruby-1.9.1-p376/signal.c 2010-04-27 10:42:26.981228311 +0100
#if USE_TRAP_MASK
# ifdef HAVE_SIGPROCMASK
static sigset_t trap_last_mask;
static sigset_t timer_thread_last_mask;
# else
static int trap_last_mask;
# endif
......
sigfillset(&mask);
sigdelset(&mask, SIGVTALRM);
sigdelset(&mask, SIGSEGV);
pthread_sigmask(SIG_SETMASK, &mask, NULL);
pthread_sigmask(SIG_SETMASK, &mask, &timer_thread_last_mask);
#endif
}
......
rb_enable_interrupt(void)
{
#ifndef _WIN32
sigset_t mask;
sigemptyset(&mask);
pthread_sigmask(SIG_SETMASK, &mask, NULL);
pthread_sigmask(SIG_SETMASK, &timer_thread_last_mask, NULL);
#endif
}
../ruby-1.9.1-p376/thread_pthread.c 2010-04-27 10:47:42.416099121 +0100
thread_timer(void *dummy)
{
struct timespec ts;
#ifndef _WIN32
sigset_t mask;
sigfillset(&mask);
pthread_sigmask(SIG_SETMASK, &mask, NULL);
#endif
native_mutex_lock(&timer_thread_lock);
native_cond_broadcast(&timer_thread_cond);
    (1-1/1)