From ca598d31405ac77d5515a3d0b70eda9d41b5bf10 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sun, 8 Jan 2017 12:26:10 +0100 Subject: [PATCH] Remove thread-exited? check in sigaction * libguile/scmsigs.c (scm_sigaction_for_thread): Remove check that thread hadn't exited. This check was racy as it's always possible that the other thread exits between checking it or even after the signal handler is installed. --- libguile/scmsigs.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c index 36143afc4..f210380e8 100644 --- a/libguile/scmsigs.c +++ b/libguile/scmsigs.c @@ -327,11 +327,7 @@ SCM_DEFINE (scm_sigaction_for_thread, "sigaction", 1, 3, 0, if (SCM_UNBNDP (thread)) thread = scm_current_thread (); else - { - SCM_VALIDATE_THREAD (4, thread); - if (scm_c_thread_exited_p (thread)) - SCM_MISC_ERROR ("thread has already exited", SCM_EOL); - } + SCM_VALIDATE_THREAD (4, thread); scm_i_ensure_signal_delivery_thread ();