summaryrefslogtreecommitdiff
path: root/Kernel/TTY/TTY.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-09-08 18:07:25 +0200
committerAndreas Kling <kling@serenityos.org>2020-09-09 21:10:23 +0200
commitf8e59addf7d6a39ed9c907bdaa5cdb43d6fb9b69 (patch)
tree51910623b73849542c803afaf6b9b0243ab3016e /Kernel/TTY/TTY.cpp
parent687aad01be874ee5d5cbbe6cc7cea6a47d4eee2d (diff)
downloadserenity-f8e59addf7d6a39ed9c907bdaa5cdb43d6fb9b69.zip
Kernel+LibC+UE: Introduce SIGINFO (generated with ^T)
This signal is ignored by default, but can be caught to implement state reporting a la BSD. :^)
Diffstat (limited to 'Kernel/TTY/TTY.cpp')
-rw-r--r--Kernel/TTY/TTY.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/Kernel/TTY/TTY.cpp b/Kernel/TTY/TTY.cpp
index ac6fbc1a00..672e1885d2 100644
--- a/Kernel/TTY/TTY.cpp
+++ b/Kernel/TTY/TTY.cpp
@@ -48,7 +48,7 @@ void TTY::set_default_termios()
{
memset(&m_termios, 0, sizeof(m_termios));
m_termios.c_lflag |= ISIG | ECHO | ICANON;
- static const char default_cc[32] = "\003\034\010\025\004\0\1\0\021\023\032\0\022\017\027\026\0";
+ static const char default_cc[32] = "\003\034\010\025\004\0\1\0\021\023\032\0\022\017\027\026\0\024";
memcpy(m_termios.c_cc, default_cc, sizeof(default_cc));
}
@@ -141,6 +141,11 @@ bool TTY::is_werase(u8 ch) const
void TTY::emit(u8 ch)
{
if (should_generate_signals()) {
+ if (ch == m_termios.c_cc[VINFO]) {
+ dbg() << tty_name() << ": VINFO pressed!";
+ generate_signal(SIGINFO);
+ return;
+ }
if (ch == m_termios.c_cc[VINTR]) {
dbg() << tty_name() << ": VINTR pressed!";
generate_signal(SIGINT);