mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 18:46:03 +00:00
LibCore: Add a Core::Process action to close a file after spawning
This commit is contained in:
parent
fecd08ce64
commit
dc52404aec
Notes:
sideshowbarker
2024-07-17 09:39:38 +09:00
Author: https://github.com/trflynn89
Commit: dc52404aec
Pull-request: https://github.com/SerenityOS/serenity/pull/24092
Reviewed-by: https://github.com/ADKaster ✅
2 changed files with 11 additions and 3 deletions
|
@ -24,6 +24,10 @@ struct OpenFile {
|
|||
mode_t permissions = 0600;
|
||||
};
|
||||
|
||||
struct CloseFile {
|
||||
int fd { -1 };
|
||||
};
|
||||
|
||||
// FIXME: Implement other file actions
|
||||
|
||||
}
|
||||
|
@ -31,9 +35,9 @@ struct OpenFile {
|
|||
struct ProcessSpawnOptions {
|
||||
ByteString executable;
|
||||
bool search_for_executable_in_path { false };
|
||||
Vector<ByteString> const& arguments = {};
|
||||
Optional<ByteString> working_directory = {};
|
||||
Vector<Variant<FileAction::OpenFile>> const& file_actions = {};
|
||||
Vector<ByteString> const& arguments {};
|
||||
Optional<ByteString> working_directory {};
|
||||
Vector<Variant<FileAction::OpenFile, FileAction::CloseFile>> const& file_actions {};
|
||||
};
|
||||
|
||||
class Process {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue