mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07:44 +00:00
Kernel: Have TTY subclasses cache their tty_name/pts_name.
This commit is contained in:
parent
d384c7815f
commit
88f03f86ff
6 changed files with 9 additions and 3 deletions
|
@ -13,6 +13,7 @@ MasterPTY::MasterPTY(unsigned index)
|
|||
, m_slave(adopt(*new SlavePTY(*this, index)))
|
||||
, m_index(index)
|
||||
{
|
||||
m_pts_name = String::format("/dev/pts/%u", m_index);
|
||||
set_uid(current->process().uid());
|
||||
set_gid(current->process().gid());
|
||||
}
|
||||
|
@ -27,7 +28,7 @@ MasterPTY::~MasterPTY()
|
|||
|
||||
String MasterPTY::pts_name() const
|
||||
{
|
||||
return String::format("/dev/pts/%u", m_index);
|
||||
return m_pts_name;
|
||||
}
|
||||
|
||||
ssize_t MasterPTY::read(Process&, byte* buffer, ssize_t size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue