summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCore/System.h
diff options
context:
space:
mode:
authorJunior Rantila <junior.rantila@gmail.com>2022-01-10 14:34:09 +0100
committerAndreas Kling <kling@serenityos.org>2022-01-11 16:04:29 +0100
commit0d328f3c86a421089720883864d363dad2f88d25 (patch)
treee5580d13b0e94825293e2b5b0af4ca055602da8f /Userland/Libraries/LibCore/System.h
parent315e1c705f432e8dc31f716389198b99ff818647 (diff)
downloadserenity-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.h7
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);