1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:07:36 +00:00

LibC: Add POSIX spec links to wait, waitpid and waitid

This commit is contained in:
SeekingBlues 2022-06-17 09:43:11 +08:00 committed by Andreas Kling
parent 4796a25bbd
commit cba4750921

View file

@ -12,11 +12,13 @@
extern "C" {
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/wait.html
pid_t wait(int* wstatus)
{
return waitpid(-1, wstatus, 0);
}
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/waitpid.html
pid_t waitpid(pid_t waitee, int* wstatus, int options)
{
siginfo_t siginfo;
@ -73,6 +75,7 @@ pid_t waitpid(pid_t waitee, int* wstatus, int options)
return siginfo.si_pid;
}
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/waitid.html
int waitid(idtype_t idtype, id_t id, siginfo_t* infop, int options)
{
Syscall::SC_waitid_params params { idtype, id, infop, options };