From 3098c0eb0b274f342a98e90125ed3e007de797c2 Mon Sep 17 00:00:00 2001 From: kojix2 <2xijok@gmail.com> Date: Sat, 11 Jan 2025 20:41:28 +0900 Subject: [PATCH] Use internal at_exit handler to release the alternate signal stack --- src/crystal/system/unix/signal.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crystal/system/unix/signal.cr b/src/crystal/system/unix/signal.cr index 090b2ea59480..2d1bd119c3b8 100644 --- a/src/crystal/system/unix/signal.cr +++ b/src/crystal/system/unix/signal.cr @@ -227,7 +227,7 @@ module Crystal::System::Signal altstack.ss_flags = 0 LibC.sigaltstack(pointerof(altstack), nil) - at_exit { + Crystal::AtExitHandlers.__crystal_add ->(s : Int32, e : ::Exception?) { reset_signal_stack(pointerof(altstack)) }