mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +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
Notes:
sideshowbarker
2024-07-18 18:47:52 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/0a94b4233f8 Pull-request: https://github.com/SerenityOS/serenity/pull/6800
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…
Reference in a new issue