1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:18:12 +00:00

Rage hacking to get bash to run. It finally runs. So cool! :^)

This commit is contained in:
Andreas Kling 2018-11-11 15:36:40 +01:00
parent 9b70808ab5
commit d5d45d1088
31 changed files with 567 additions and 61 deletions

View file

@ -1,6 +1,7 @@
#pragma once
#include <VirtualFileSystem/CharacterDevice.h>
#include <VirtualFileSystem/UnixTypes.h>
class TTY : public CharacterDevice {
public:
@ -15,6 +16,10 @@ public:
void set_pgid(pid_t pgid) { m_pgid = pgid; }
pid_t pgid() const { return m_pgid; }
Unix::termios& termios() { return m_termios; }
bool should_generate_signals() const { return m_termios.c_lflag & ISIG; }
bool should_echo_input() const { return m_termios.c_lflag & ECHO; }
protected:
virtual bool isTTY() const final override { return true; }
@ -28,5 +33,6 @@ protected:
private:
Vector<byte> m_buffer;
pid_t m_pgid { 0 };
Unix::termios m_termios;
};