1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:37:44 +00:00

TTY: Flush input on signal character.

We now flush the input when we recieve a signal character.
This can be disabled using the newly implemented NOFLSH
attribute.
This commit is contained in:
Drew Stratford 2019-11-02 03:24:14 +13:00 committed by Andreas Kling
parent 233ea7eb1d
commit b880f1928a
2 changed files with 11 additions and 0 deletions

View file

@ -28,6 +28,7 @@ public:
void set_termios(const termios&);
bool should_generate_signals() const { return m_termios.c_lflag & ISIG; }
bool should_flush_on_signal() const { return !(m_termios.c_lflag & NOFLSH); }
bool should_echo_input() const { return m_termios.c_lflag & ECHO; }
bool in_canonical_mode() const { return m_termios.c_lflag & ICANON; }
@ -46,6 +47,7 @@ protected:
void do_backspace();
void erase_word();
void kill_line();
void flush_input();
bool is_eol(u8) const;
bool is_eof(u8) const;