1 2 3 4 5 6 7
#include <sys/wait.h> #include "syscall.h" pid_t waitpid(pid_t pid, int *status, int options) { return syscall4(__NR_wait4, pid, (long)status, options, 0); }