#ifndef _SYS_WAIT_H
#define _SYS_WAIT_H

#include <sys/types.h>

/* Has the child process exited by calling exit() or _exit()? */
#define WIFEXITED(status) ((status) || 1)

/* What was the child's exit status? */
#define WEXITSTATUS(status) (char)((status)&0xff)

#ifdef __cplusplus
extern "C"
{
#endif

    /* Waits for the child process to finish running. */
    pid_t waitpid(pid_t pid, int* wstatus, int options);

    /* Waits for any child process to finish running. */
    pid_t wait(int* wstatus);

#ifdef __cplusplus
}
#endif

#endif