19 lines
358 B
C++
19 lines
358 B
C++
#include <bits/errno-return.h>
|
|
#include <sys/syscall.h>
|
|
#include <sys/wait.h>
|
|
#include <unistd.h>
|
|
|
|
extern "C"
|
|
{
|
|
pid_t waitpid(pid_t pid, int* status, int options)
|
|
{
|
|
long rc = syscall(SYS_waitpid, pid, status, options);
|
|
__errno_return(rc, pid_t);
|
|
}
|
|
|
|
pid_t wait(int* status)
|
|
{
|
|
return waitpid(-1, status, 0);
|
|
}
|
|
}
|