summaryrefslogtreecommitdiff
path: root/libguile
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-10-01 15:28:41 +0200
committerLudovic Courtès <ludo@gnu.org>2022-10-01 16:00:05 +0200
commitdf86a2a8c8725ac6244a222d399a5b959101f621 (patch)
tree4171193acbe935c64efe94a0232aecbbed082c41 /libguile
parentd1a4b101bf66c5ba62b1c5c26dd1b48526908ede (diff)
downloadguile-df86a2a8c8725ac6244a222d399a5b959101f621.tar.gz
Finalization thread exits when it gets EOF on its pipe.
Avoids spurious "error in finalization thread: Success" messages when the finalization pipe gets closed. * libguile/finalizers.c (finalization_thread_proc): Return when 'data.n' is zero.
Diffstat (limited to 'libguile')
-rw-r--r--libguile/finalizers.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libguile/finalizers.c b/libguile/finalizers.c
index 5122e5fe3..1370755bf 100644
--- a/libguile/finalizers.c
+++ b/libguile/finalizers.c
@@ -1,4 +1,4 @@
-/* Copyright 2012-2014,2018-2020
+/* Copyright 2012-2014,2018-2020,2022
Free Software Foundation, Inc.
This file is part of Guile.
@@ -226,8 +226,11 @@ finalization_thread_proc (void *unused)
struct finalization_pipe_data data;
scm_without_guile (read_finalization_pipe_data, &data);
-
- if (data.n <= 0)
+
+ if (data.n == 0)
+ /* The other end of the pipe was closed, so exit. */
+ return NULL;
+ else if (data.n < 0)
{
if (data.err != EINTR)
{