mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 04:13:11 +00:00
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:
parent
083c5f8b89
commit
2f16e31afc
|
@ -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&);
|
||||
|
|
Loading…
Reference in a new issue