mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 11:48:32 +00:00
Kernel: Allow File::close() to fail
And pass the result through to sys$close() return value. Fixes https://github.com/SerenityOS/serenity/issues/427
This commit is contained in:
committed by
Andreas Kling
parent
d4ddb0013c
commit
1b4e88fb59
@@ -256,9 +256,11 @@ MasterPTY* FileDescription::master_pty()
|
||||
return static_cast<MasterPTY*>(m_file.ptr());
|
||||
}
|
||||
|
||||
int FileDescription::close()
|
||||
KResult FileDescription::close()
|
||||
{
|
||||
return 0;
|
||||
if (m_file->ref_count() > 1)
|
||||
return KSuccess;
|
||||
return m_file->close();
|
||||
}
|
||||
|
||||
String FileDescription::absolute_path() const
|
||||
|
||||
Reference in New Issue
Block a user