2023-03-23 21:42:24 +00:00
|
|
|
/* sys/wait.h: Functions for waiting. */
|
|
|
|
|
|
|
|
#ifndef _SYS_WAIT_H
|
|
|
|
#define _SYS_WAIT_H
|
|
|
|
|
|
|
|
#include <bits/waitpid.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
2023-04-08 10:18:52 +00:00
|
|
|
#define WIFEXITED(ret) ((ret) | 0)
|
|
|
|
#define WEXITSTATUS(ret) ((ret)&0xff)
|
|
|
|
|
2023-03-23 21:42:24 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Wait for a child process to exit. */
|
|
|
|
pid_t waitpid(pid_t pid, int* status, int options);
|
|
|
|
|
2023-03-24 16:39:55 +00:00
|
|
|
/* Wait for any child process to exit. */
|
|
|
|
pid_t wait(int* status);
|
|
|
|
|
2023-03-23 21:42:24 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|