mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 02:26:10 +00:00
LibCore+flock: Make Core::System::waitpid more ergonomic
This commit is contained in:
parent
315e1c705f
commit
0d328f3c86
Notes:
sideshowbarker
2024-07-17 21:11:59 +09:00
Author: https://github.com/juniorrantila
Commit: 0d328f3c86
Pull-request: https://github.com/SerenityOS/serenity/pull/11790
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
3 changed files with 11 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue