diff options
Diffstat (limited to 'src/libc/syswait.c')
-rw-r--r-- | src/libc/syswait.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libc/syswait.c b/src/libc/syswait.c index 43c20ae..d7da2e0 100644 --- a/src/libc/syswait.c +++ b/src/libc/syswait.c @@ -10,11 +10,18 @@ pid_t wait(int *wstatus) { } pid_t wait3(int *wstatus, int opts, struct rusage *rusage) { + if (rusage) { + __libc_panic("unimplemented"); + } + return waitpid(-1, wstatus, opts); +} + +pid_t waitpid(pid_t pid, int *wstatus, int opts) { struct sys_wait2 res; - if (opts || rusage) { + if (opts) { __libc_panic("unimplemented"); } - pid_t ret = _sys_wait2(-1, 0, &res); + pid_t ret = _sys_wait2(pid, 0, &res); if (ret < 0) { errno = -ret; return -1; |