Implement waitpid() support for getting the waitee's exit code.

This commit is contained in:
Andreas Kling 2018-10-27 01:24:22 +02:00
commit ec07761d0f
Notes: sideshowbarker 2024-07-19 18:37:45 +09:00
7 changed files with 33 additions and 10 deletions

View file

@ -39,9 +39,9 @@ int close(int fd)
__RETURN_WITH_ERRNO(rc, rc, -1);
}
pid_t waitpid(pid_t waitee)
pid_t waitpid(pid_t waitee, int* wstatus, int options)
{
int rc = Syscall::invoke(Syscall::PosixWaitpid, waitee);
int rc = Syscall::invoke(Syscall::PosixWaitpid, waitee, (dword)wstatus);
__RETURN_WITH_ERRNO(rc, rc, -1);
}