1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:07:36 +00:00

LibCore+flock: Make Core::System::waitpid more ergonomic

This commit is contained in:
Junior Rantila 2022-01-10 14:34:09 +01:00 committed by Andreas Kling
parent 315e1c705f
commit 0d328f3c86
3 changed files with 11 additions and 5 deletions

View file

@ -19,7 +19,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
}
pid_t child_pid = TRY(Core::System::posix_spawnp(arguments.strings[2], nullptr, nullptr, &arguments.argv[2], environ));
int status = TRY(Core::System::waitpid(child_pid, &status, 0));
auto [_, status] = TRY(Core::System::waitpid(child_pid));
return WEXITSTATUS(status);
}