Skip to content

Commit

Permalink
Use internal at_exit handler to release the alternate signal stack
Browse files Browse the repository at this point in the history
  • Loading branch information
kojix2 committed Jan 11, 2025
1 parent d4d5f87 commit 3098c0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crystal/system/unix/signal.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

Expand Down

0 comments on commit 3098c0e

Please sign in to comment.