mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:27:43 +00:00
LibCore: Add method to leak fd from File
This will let other code use the fd while making sure the fd isn't automatically closed by Core::File's destructor
This commit is contained in:
parent
2ef28602ba
commit
60f84f3154
2 changed files with 7 additions and 0 deletions
|
@ -74,6 +74,7 @@ public:
|
|||
Yes
|
||||
};
|
||||
bool open(int fd, OpenMode, ShouldCloseFileDescriptor);
|
||||
[[nodiscard]] int leak_fd();
|
||||
|
||||
static NonnullRefPtr<File> standard_input();
|
||||
static NonnullRefPtr<File> standard_output();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue