terminal: Send signals on ^C and ^\
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
This commit is contained in:
parent
f8879015ee
commit
6f683c48f0
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user