#include #include #include #include #include #include pid_t wait3(int *wstatus, int opts, struct rusage *rusage) { struct sys_wait2 res; if (opts || rusage) { __libc_panic("unimplemented"); } pid_t ret = _sys_wait2(-1, 0, &res); if (ret < 0) { errno = -ret; return -1; } if (wstatus) { *wstatus = res.status & 0xFF; } return ret; }