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:
Sergey Bugaev 2020-06-02 19:20:05 +03:00 committed by Andreas Kling
commit 1b4e88fb59
Notes: sideshowbarker 2024-07-19 05:52:57 +09:00
12 changed files with 23 additions and 15 deletions

View file

@ -51,7 +51,7 @@ private:
virtual ssize_t read(FileDescription&, size_t, u8*, ssize_t) override;
virtual bool can_write(const FileDescription&, size_t) const override;
virtual const char* class_name() const override { return "SlavePTY"; }
virtual void close() override;
virtual KResult close() override;
friend class MasterPTY;
SlavePTY(MasterPTY&, unsigned index);