Skip to content

Commit

Permalink
Remove std::quick_exit from macOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
a-n-t-h-o-n-y committed Jan 25, 2024
1 parent d7b684c commit 37a8e3d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/detail/signals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -44,7 +48,9 @@ std::atomic<bool> 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"};
Expand Down

0 comments on commit 37a8e3d

Please sign in to comment.