diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-11-02 13:14:25 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-11-02 13:14:25 +0100 |
commit | 621217ffeb9bddec866ad8895bd01973977f2848 (patch) | |
tree | a093956e51c52f13cc0f7003e278bc255f83acac /VirtualFileSystem | |
parent | d8f0dd6f3b36987c2a8021e16341dda16cbb7ab1 (diff) | |
download | serenity-621217ffeb9bddec866ad8895bd01973977f2848.zip |
Add tcsetpgrp()+tcgetpgrp().
One more step on the path to being able to ^C a runaway process. :^)
Diffstat (limited to 'VirtualFileSystem')
-rw-r--r-- | VirtualFileSystem/FileHandle.cpp | 7 | ||||
-rw-r--r-- | VirtualFileSystem/FileHandle.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/VirtualFileSystem/FileHandle.cpp b/VirtualFileSystem/FileHandle.cpp index 6f9354a143..49199f6b22 100644 --- a/VirtualFileSystem/FileHandle.cpp +++ b/VirtualFileSystem/FileHandle.cpp @@ -176,6 +176,13 @@ const TTY* FileHandle::tty() const return nullptr; } +TTY* FileHandle::tty() +{ + if (auto* device = m_vnode->characterDevice()) + return static_cast<TTY*>(device); + return nullptr; +} + int FileHandle::close() { return 0; diff --git a/VirtualFileSystem/FileHandle.h b/VirtualFileSystem/FileHandle.h index d5e0d1bf2d..bf6a842891 100644 --- a/VirtualFileSystem/FileHandle.h +++ b/VirtualFileSystem/FileHandle.h @@ -30,6 +30,7 @@ public: bool isTTY() const; const TTY* tty() const; + TTY* tty(); InodeMetadata metadata() const { return m_vnode->metadata(); } |