diff options
author | Andrea Azzarone <andrea.azzarone@canonical.com> | 2019-04-11 16:30:58 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2019-05-23 17:41:10 +0200 |
commit | fd4ba18bca1c6000fc0dd417a5b489e1ac60e0d9 (patch) | |
tree | 16d99e5da955ab0e889c599772149d4388f3d3ad /libguile/scmsigs.c | |
parent | cca381ce1756abc04e6863d06a4fe620759894b0 (diff) | |
download | guile-fd4ba18bca1c6000fc0dd417a5b489e1ac60e0d9.tar.gz |
Fix gc.test "after-gc-hook gets called" failures.
* libguile/scmsigs.c (signal_delivery_thread): Call scm_async_tick to
give any pending asyncs a chance to run before we block indefinitely
waiting for a signal to arrive.
Diffstat (limited to 'libguile/scmsigs.c')
-rw-r--r-- | libguile/scmsigs.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c index b4bd380be..1583f4f3e 100644 --- a/libguile/scmsigs.c +++ b/libguile/scmsigs.c @@ -182,6 +182,14 @@ signal_delivery_thread (void *data) { struct signal_pipe_data sigdata; + /* This tick gives any pending asyncs a chance to run before we + block indefinitely waiting for a signal to arrive. For example + it can happen that the garbage collector is triggered while + marking the signal handler for future execution. Due to the + way the after-gc-hook is designed, without a call to + scm_async_tick, the after-gc-hook will not be triggered. */ + scm_async_tick (); + scm_without_guile (read_signal_pipe_data, &sigdata); sig = sigdata.sigbyte; |