Add sys/wait.h

This commit is contained in:
Ali Mashtizadeh 2023-10-02 19:34:24 -04:00
parent 92c5b44114
commit fb3348128e

20
sys/include/wait.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef __SYS_WAIT_H__
#define __SYS_WAIT_H__
#include <sys/cdefs.h>
/* Extract the status code from the process */
#define WEXITSTATUS(_x) (_x & 0x000000ff)
#define WGETPID(_x) ((pid_t)(_x >> 16))
/* Flags to waitpid */
#define WAIT_ANY 0
#ifndef _KERNEL
pid_t wait(int *status);
pid_t waitpid(pid_t pid, int *status, int options);
#endif
#endif /* __SYS_WAIT_H__ */