1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:37:46 +00:00

LibCore+JSSpecCompiler: Add option for Process::spawn() to use spawnp()

Add a boolean to ProcessSpawnOptions, `search_for_executable_in_path`,
which when true, calls into posix_spawnp() instead of posix_spawn().
This defaults to false to maintain the existing behavior.

The `path` field is renamed to `executable` because having two fields
refer to "path" and mean different things seemed unnecessarily
confusing.
This commit is contained in:
Sam Atkins 2024-01-16 13:42:30 +00:00 committed by Andrew Kaster
parent 48983a43b1
commit 071f7fd818
3 changed files with 13 additions and 8 deletions

View file

@ -152,7 +152,7 @@ TEST_CASE(test_regression)
auto path_to_expectation = LexicalPath::join(path_to_tests_directory.string(), ByteString::formatted("{}.expectation", source));
auto process = MUST(Core::Process::spawn({
.path = path_to_compiler_binary.string(),
.executable = path_to_compiler_binary.string(),
.arguments = build_command_line_arguments(path_to_test, test_description),
.file_actions = {
Core::FileAction::OpenFile {