2023-03-23 22:42:24 +01:00
|
|
|
#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);
|
|
|
|
}
|
2023-03-24 17:39:55 +01:00
|
|
|
|
|
|
|
pid_t wait(int* status)
|
|
|
|
{
|
|
|
|
return waitpid(-1, status, 0);
|
|
|
|
}
|
2023-03-23 22:42:24 +01:00
|
|
|
}
|