toaruos/libc/sys/wait.c

15 lines
315 B
C
Raw Normal View History

2018-02-25 08:13:54 +03:00
#include <syscall.h>
#include <syscall_nums.h>
2018-02-25 08:13:54 +03:00
#include <errno.h>
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);
}