1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00

Exclude the finalizer thread from the ‘all-threads’ result.

Fixes <https://bugs.gnu.org/76343>.

Fixes a bug whereby “echo '(environ)' | guile” would wrongfully trigger
the multiple-thread warning.

* libguile/finalizers.c (finalizer_thread): New variable.
(finalization_thread_proc): Set it.
(scm_i_is_finalizer_thread): New function.
(run_finalization_thread): Clear FINALIZER_THREAD.
* libguile/finalizers.h (scm_i_is_finalizer_thread): New declaration.
* libguile/threads.c (scm_all_threads): Use it.
* NEWS: Update.

Reported-by: Simon Josefsson <simon@josefsson.org>
This commit is contained in:
Ludovic Courtès 2025-02-26 15:48:41 +01:00
parent 75fd1d6434
commit b8031fc965
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
4 changed files with 34 additions and 7 deletions

8
NEWS
View file

@ -1,5 +1,5 @@
Guile NEWS --- history of user-visible changes.
Copyright (C) 1996-2024 Free Software Foundation, Inc.
Copyright (C) 1996-2025 Free Software Foundation, Inc.
See the end for copying conditions.
Please send Guile bug reports to bug-guile@gnu.org.
@ -80,6 +80,12 @@ every line in a file.
(<https://bugs.gnu.org/75642>)
** Change <libguile/scm.h> to allow compilation with -Werror=undef
(<https://bugs.gnu.org/75085>)
** 'all-threads' no longer includes the finalizer thread
(<https://bugs.gnu.org/76343>)
Previously 'all-threads' would include the finalizer thread. This,
in turn, would trigger warnings from 'primitive-fork' and 'environ'
suggesting they are being called in a multi-threaded context, when in
fact user code did not create any thread.
Changes in 3.0.10 (since 3.0.9)