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:
parent
315e1c705f
commit
0d328f3c86
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