mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:28:11 +00:00
Kernel: Don't use ref_count() in MasterPTY::close()
With the recent fixes to how close() gets called this is not necessary anymore.
This commit is contained in:
parent
9b2dd0f3b4
commit
0a94b4233f
1 changed files with 5 additions and 6 deletions
|
@ -94,14 +94,13 @@ bool MasterPTY::can_write_from_slave() const
|
|||
|
||||
KResult MasterPTY::close()
|
||||
{
|
||||
if (ref_count() == 2) {
|
||||
InterruptDisabler disabler;
|
||||
// After the closing FileDescription dies, slave is the only thing keeping me alive.
|
||||
// From this point, let's consider ourselves closed.
|
||||
m_closed = true;
|
||||
InterruptDisabler disabler;
|
||||
// After the closing FileDescription dies, slave is the only thing keeping me alive.
|
||||
// From this point, let's consider ourselves closed.
|
||||
m_closed = true;
|
||||
|
||||
if (m_slave)
|
||||
m_slave->hang_up();
|
||||
}
|
||||
|
||||
return KSuccess;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue