Feature #14901 ยป 0001-do-not-block-SIGCHLD-in-normal-Ruby-Threads.patch
process.c | ||
---|---|---|
}
|
||
}
|
||
/* non-Ruby child process, ensure cmake can see SIGCHLD */
|
||
sigemptyset(&old->sigmask);
|
||
ret = sigprocmask(SIG_SETMASK, &old->sigmask, NULL); /* async-signal-safe */
|
||
if (ret != 0) {
|
||
ERRMSG("sigprocmask");
|
signal.c | ||
---|---|---|
#ifdef HAVE_PTHREAD_SIGMASK
|
||
sigset_t mask;
|
||
sigemptyset(&mask);
|
||
sigaddset(&mask, RUBY_SIGCHLD); /* timer-thread handles this */
|
||
pthread_sigmask(SIG_SETMASK, &mask, NULL);
|
||
#endif
|
||
}
|
thread_pthread.c | ||
---|---|---|
thread_timer(void *p)
|
||
{
|
||
rb_vm_t *vm = p;
|
||
#ifdef HAVE_PTHREAD_SIGMASK /* mainly to enable SIGCHLD */
|
||
{
|
||
sigset_t mask;
|
||
sigemptyset(&mask);
|
||
pthread_sigmask(SIG_SETMASK, &mask, NULL);
|
||
}
|
||
#endif
|
||
if (TT_DEBUG) WRITE_CONST(2, "start timer thread\n");
|
||
-
|