Block interrupts when exiting the thread.

This commit is contained in:
Juan Jose Garcia Ripoll 2012-04-11 21:58:05 +02:00
parent 036cb55928
commit 3bbba10703

View file

@ -196,6 +196,14 @@ thread_cleanup(void *aux)
*/
cl_object process = (cl_object)aux;
cl_env_ptr env = process->process.env;
#ifdef HAVE_SIGPROCMASK
/* No signals from here on */
{
sigset_t new[1];
sigaddset(new, ecl_option_values[ECL_OPT_SIGNAL_HANDLING_THREAD]);
pthread_sigmask(SIG_BLOCK, new, NULL);
}
#endif
/* The following flags will disable all interrupts. */
AO_store((AO_t*)&process->process.phase, ECL_PROCESS_EXITING);
ecl_unlist_process(process);