diff options
author | Junior Rantila <junior.rantila@gmail.com> | 2022-01-10 14:34:09 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-01-11 16:04:29 +0100 |
commit | 0d328f3c86a421089720883864d363dad2f88d25 (patch) | |
tree | e5580d13b0e94825293e2b5b0af4ca055602da8f /Userland/Libraries/LibCore/System.h | |
parent | 315e1c705f432e8dc31f716389198b99ff818647 (diff) | |
download | serenity-0d328f3c86a421089720883864d363dad2f88d25.zip |
LibCore+flock: Make Core::System::waitpid more ergonomic
Diffstat (limited to 'Userland/Libraries/LibCore/System.h')
-rw-r--r-- | Userland/Libraries/LibCore/System.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Userland/Libraries/LibCore/System.h b/Userland/Libraries/LibCore/System.h index 40a1d0d888..7cf6027d53 100644 --- a/Userland/Libraries/LibCore/System.h +++ b/Userland/Libraries/LibCore/System.h @@ -85,7 +85,12 @@ ErrorOr<Optional<struct passwd>> getpwuid(uid_t); ErrorOr<Optional<struct group>> getgrgid(gid_t); ErrorOr<void> clock_settime(clockid_t clock_id, struct timespec* ts); ErrorOr<pid_t> posix_spawnp(StringView const path, posix_spawn_file_actions_t* const file_actions, posix_spawnattr_t* const attr, char* const arguments[], char* const envp[]); -ErrorOr<pid_t> waitpid(pid_t waitee, int* wstatus, int options); + +struct WaitPidResult { + pid_t pid; + int status; +}; +ErrorOr<WaitPidResult> waitpid(pid_t waitee, int options = 0); ErrorOr<void> setuid(uid_t); ErrorOr<void> seteuid(uid_t); ErrorOr<void> setgid(gid_t); |