mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-13 12:52:08 -08:00
signals: Don't block GC suspend/resume signals on interrupt thread
Blocking all signals except default interrupt caused OpenBSD broken multithread builds, because of GC semaphore lockup waiting, untill all threads are stopped. Fixes #71. Signed-off-by: jack <jack@openbsd.my.domain>
This commit is contained in:
parent
d017692cd8
commit
2b1892a47e
2 changed files with 6 additions and 2 deletions
|
|
@ -41,6 +41,8 @@
|
|||
|
||||
- Duplicate large block deallocation with GMP 6.0.0a fixed
|
||||
|
||||
- ECL builds on OpenBSD with threads enabled
|
||||
|
||||
- Other minor tweaks
|
||||
|
||||
** Enchantments:
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
* them (synchronous signals), such as floating point exceptions, or
|
||||
* extrinsic (asynchronous signals), such as the process being aborted
|
||||
* by the user.
|
||||
*
|
||||
*
|
||||
* Of course, those interruptions are not always welcome. When the
|
||||
* interrupt is delivered and a handler is invoked, the thread or even
|
||||
* the whole program may be in an inconsistent state. For instance the
|
||||
|
|
@ -526,7 +526,7 @@ asynchronous_signal_servicing_thread()
|
|||
const cl_env_ptr the_env = ecl_process_env();
|
||||
int interrupt_signal = -1;
|
||||
/*
|
||||
* We block all signals except the usual interrupt thread.
|
||||
* We block all signals except the usual interrupt thread and GC signals.
|
||||
*/
|
||||
{
|
||||
sigset_t handled_set;
|
||||
|
|
@ -535,6 +535,8 @@ asynchronous_signal_servicing_thread()
|
|||
interrupt_signal =
|
||||
ecl_option_values[ECL_OPT_THREAD_INTERRUPT_SIGNAL];
|
||||
sigdelset(&handled_set, interrupt_signal);
|
||||
sigdelset(&handled_set, GC_get_suspend_signal());
|
||||
sigdelset(&handled_set, GC_get_thr_restart_signal());
|
||||
}
|
||||
pthread_sigmask(SIG_BLOCK, &handled_set, NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue