That function is meant more for user programs, and should still be rarely used, since it's not portable. Instead, we already know the number of arguments. We just call __lc_fast_syscallN, which also sets errno.
16 lines
309 B
C++
16 lines
309 B
C++
#include <luna/syscall.h>
|
|
#include <sys/syscall.h>
|
|
#include <sys/wait.h>
|
|
|
|
extern "C"
|
|
{
|
|
pid_t waitpid(pid_t pid, int* wstatus, int options)
|
|
{
|
|
return __lc_fast_syscall3(SYS_waitpid, pid, wstatus, options);
|
|
}
|
|
|
|
pid_t wait(int* wstatus)
|
|
{
|
|
return waitpid(-1, wstatus, 0);
|
|
}
|
|
} |