Usermode/libc - Fix strchr and strrchr behavior
[tpg/acess2.git] / Usermode / Libraries / libposix.so_src / sys_wait.c
1 /*
2  * Acess2 POSIX Emulation
3  * - By John Hodge (thePowersGang)
4  *
5  * sys_wait.c
6  * - Waiting
7  */
8 #include <sys/wait.h>
9 #include <acess/sys.h>
10 #include <errno.h>
11
12 // === CODE ===
13 pid_t wait(int *status)
14 {
15         return _SysWaitTID(0, status);
16 }
17
18 pid_t waitpid(pid_t pid, int *status, int options)
19 {
20         if( options & WNOHANG ) {
21                 _SysDebug("TODO: support waitpid(...,WNOHANG)");
22                 errno = EINVAL;
23                 return -1;
24         }
25         return _SysWaitTID(pid, status);
26 }
27

UCC git Repository :: git.ucc.asn.au