Kernel: A running process should keep its TTY alive

It's not safe to use a raw pointer for Process::m_tty. A pseudoterminal
pair will disappear when file descriptors are closed, and we'd end up
looking dangly. Just use a RefPtr.
This commit is contained in:
Andreas Kling 2019-11-06 16:52:54 +01:00
parent 083c5f8b89
commit 2f16e31afc

View file

@ -348,7 +348,7 @@ private:
RefPtr<Custody> m_executable;
RefPtr<Custody> m_cwd;
TTY* m_tty { nullptr };
RefPtr<TTY> m_tty;
Region* region_from_range(const Range&);
Region* region_containing(const Range&);