2018-02-25 08:13:54 +03:00
|
|
|
#include <syscall.h>
|
2018-12-10 04:09:27 +03:00
|
|
|
#include <syscall_nums.h>
|
2018-02-25 08:13:54 +03:00
|
|
|
#include <errno.h>
|
|
|
|
|
2018-12-10 04:09:27 +03:00
|
|
|
DEFN_SYSCALL3(waitpid, SYS_WAITPID, int, int *, int);
|
|
|
|
|
2018-02-25 08:13:54 +03:00
|
|
|
int waitpid(int pid, int *status, int options) {
|
|
|
|
/* XXX: status, options? */
|
2018-07-18 04:25:01 +03:00
|
|
|
__sets_errno(syscall_waitpid(pid, status, options));
|
2018-02-25 08:13:54 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
int wait(int *status) {
|
|
|
|
return waitpid(-1, status, 0);
|
|
|
|
}
|