From 37a8e3d879acd8634482944a8621add452b0f3b7 Mon Sep 17 00:00:00 2001 From: Anthony Leedom Date: Wed, 24 Jan 2024 16:19:56 -0800 Subject: [PATCH] Remove std::quick_exit from macOS build --- src/detail/signals.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/detail/signals.cpp b/src/detail/signals.cpp index 7816fa0..434c42c 100644 --- a/src/detail/signals.cpp +++ b/src/detail/signals.cpp @@ -14,7 +14,11 @@ extern "C" auto sigint_handler(int sig) -> void if (sig == SIGINT) { if (esc::sigint_flag) { // If this is second time ctrl + c is pressed, force exit. +#if defined(__APPLE__) && defined(__MACH__) + std::_Exit(1); +#else std::quick_exit(1); +#endif } else { esc::sigint_flag = true; @@ -44,7 +48,9 @@ std::atomic window_resize_sig = false; void register_signals(bool sigint) { +#if !defined(__APPLE__) && !defined(__MACH__) std::at_quick_exit(::esc::uninitialize_terminal); +#endif if (std::signal(SIGWINCH, &resize_handler) == SIG_ERR) { throw std::runtime_error{"register_SIGWINCH(): std::signal call"};