1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:07:44 +00:00

Kernel+LibC: Add sys$waitid(), and make sys$waitpid() wrap it

sys$waitid() takes an explicit description of whether it's waiting for a single
process with the given PID, all of the children, a group, etc., and returns its
info as a siginfo_t.

It also doesn't automatically imply WEXITED, which clears up the confusion in
the kernel.
This commit is contained in:
Sergey Bugaev 2020-02-05 19:42:43 +03:00 committed by Andreas Kling
parent a6cb7f759e
commit b3a24d732d
5 changed files with 140 additions and 55 deletions

View file

@ -36,6 +36,7 @@ extern "C" {
struct timeval;
struct timespec;
struct sockaddr;
struct siginfo;
typedef u32 socklen_t;
}
@ -51,7 +52,7 @@ typedef u32 socklen_t;
__ENUMERATE_SYSCALL(exit) \
__ENUMERATE_SYSCALL(getgid) \
__ENUMERATE_SYSCALL(getpid) \
__ENUMERATE_SYSCALL(waitpid) \
__ENUMERATE_SYSCALL(waitid) \
__ENUMERATE_SYSCALL(mmap) \
__ENUMERATE_SYSCALL(munmap) \
__ENUMERATE_SYSCALL(get_dir_entries) \
@ -404,6 +405,13 @@ struct SC_unveil_params {
StringArgument permissions;
};
struct SC_waitid_params {
int idtype;
int id;
struct siginfo* infop;
int options;
};
void initialize();
int sync();