1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:17:36 +00:00

Refactor TTY signal generation a bit.

We now respect the VINTR and VQUIT control characters in the termios.
This commit is contained in:
Andreas Kling 2018-11-16 20:18:58 +01:00
parent 4e2c2b9748
commit a788e85c09
7 changed files with 51 additions and 30 deletions

View file

@ -49,16 +49,17 @@ public:
bool in_canonical_mode() const { return m_termios.c_lflag & ICANON; }
protected:
virtual bool isTTY() const final override { return true; }
virtual void onTTYWrite(const byte*, size_t) = 0;
TTY(unsigned major, unsigned minor);
void emit(byte);
virtual void onTTYWrite(const byte*, size_t) = 0;
void interrupt();
private:
// ^CharacterDevice
virtual bool isTTY() const final override { return true; }
void generate_signal(int signal);
DoubleBuffer m_buffer;
pid_t m_pgid { 0 };
Unix::termios m_termios;