30 lines
624 B
C
30 lines
624 B
C
#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)
|
|
|
|
/* Do not block the current process if no child has exited. */
|
|
#define WNOHANG 1
|
|
|
|
#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 |