Revert "Send SIGTERM on <c-c>, to more reliably kill background jobs"
Overloading SIGTERM like that causes issues; specifically if the
editor is invoked (without exec) from a wrapper script.
By sending SIGTERM to whole process group, we kill our parent process
(the wrapper script) which then sends SIGTERM to Kakoune. By this
time Kakoune has already reset the SIGTERM handler to the default
action and terminates.
We can use a different fix for the problem that some shells don't
cancel "make", see the next patch.
This reverts commit ec44d98347
.
This commit is contained in:
parent
9faad8c023
commit
5d00b80d1a
|
@ -49,9 +49,9 @@ Client::Client(std::unique_ptr<UserInterface>&& ui,
|
|||
kak_assert(key != Key::Invalid);
|
||||
if (key == ctrl('c'))
|
||||
{
|
||||
auto prev_handler = set_signal_handler(SIGTERM, SIG_IGN);
|
||||
killpg(getpgrp(), SIGTERM);
|
||||
set_signal_handler(SIGTERM, prev_handler);
|
||||
auto prev_handler = set_signal_handler(SIGINT, SIG_IGN);
|
||||
killpg(getpgrp(), SIGINT);
|
||||
set_signal_handler(SIGINT, prev_handler);
|
||||
}
|
||||
else if (key == ctrl('g'))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user