terminal: Send signals on ^C and ^\
Some checks failed
continuous-integration/drone/pr Build is failing

This commit is contained in:
apio 2023-09-18 07:21:06 +02:00
parent 3540033dd3
commit 0cb21c2e90
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -135,14 +135,9 @@ Result<ui::EventResult> TerminalWidget::handle_key_event(const ui::KeyEventReque
{ {
if (!(m_settings.c_lflag & NOFLSH)) m_line_buffer.clear(); if (!(m_settings.c_lflag & NOFLSH)) m_line_buffer.clear();
// FIXME: Send SIGINT. pid_t group = tcgetpgrp(m_pty);
/*if (m_foreground_process_group.has_value()) TRY(os::Process::kill(-group, SIGINT));
{
Scheduler::for_each_in_process_group(m_foreground_process_group.value(), [](Thread* thread) {
thread->send_signal(SIGINT);
return true;
});
}*/
is_special_character = true; is_special_character = true;
} }
@ -150,14 +145,9 @@ Result<ui::EventResult> TerminalWidget::handle_key_event(const ui::KeyEventReque
{ {
if (!(m_settings.c_lflag & NOFLSH)) m_line_buffer.clear(); if (!(m_settings.c_lflag & NOFLSH)) m_line_buffer.clear();
// FIXME: Send SIGINT. pid_t group = tcgetpgrp(m_pty);
/*if (m_foreground_process_group.has_value()) TRY(os::Process::kill(-group, SIGQUIT));
{
Scheduler::for_each_in_process_group(m_foreground_process_group.value(), [](Thread* thread) {
thread->send_signal(SIGQUIT);
return true;
});
}*/
is_special_character = true; is_special_character = true;
} }
} }
@ -598,5 +588,5 @@ void TerminalWidget::put_code_point(wchar_t c)
void TerminalWidget::quit() void TerminalWidget::quit()
{ {
kill(m_child_pid, SIGHUP); kill(-tcgetpgrp(m_pty), SIGHUP);
} }