mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-16 06:12:25 -08:00
Block interrupts when exiting the thread.
This commit is contained in:
parent
036cb55928
commit
3bbba10703
1 changed files with 8 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue