2023-06-04 17:59:13 +03:00
|
|
|
#include <sys/syscall.h>
|
|
|
|
#include <sys/wait.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
pid_t wait(int* stat_loc)
|
|
|
|
{
|
|
|
|
return waitpid(-1, stat_loc, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
pid_t waitpid(pid_t pid, int* stat_loc, int options)
|
|
|
|
{
|
|
|
|
return (pid_t)syscall(SYS_WAIT, pid, stat_loc, options);
|
2024-01-24 14:43:46 +02:00
|
|
|
}
|