diff options
| author | Maxime Coste <mawww@kakoune.org> | 2021-07-12 10:08:17 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2021-07-12 10:08:17 +1000 |
| commit | 7622ebcc92b19cc3615d89f1869cde034e80503d (patch) | |
| tree | e890781a0d4cf7e6c46c686b4f941fad182fb94e /src/client.cc | |
| parent | c30a0e0ca27aa93db65fb9d2399a596eeb610b6d (diff) | |
Quit server on SIGINT when it was not signaled by Kakoune itself
Fixes #3974
Diffstat (limited to 'src/client.cc')
| -rw-r--r-- | src/client.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client.cc b/src/client.cc index da178623..945b4d2f 100644 --- a/src/client.cc +++ b/src/client.cc @@ -47,7 +47,11 @@ Client::Client(std::unique_ptr<UserInterface>&& ui, m_ui->set_ui_options(m_window->options()["ui_options"].get<UserInterface::Options>()); m_ui->set_on_key([this](Key key) { if (key == ctrl('c')) + { + auto prev_handler = set_signal_handler(SIGINT, SIG_IGN); killpg(getpgrp(), SIGINT); + set_signal_handler(SIGINT, prev_handler); + } else if (key.modifiers & Key::Modifiers::Resize) { m_window->set_dimensions(key.coord()); |
