Luna/libc/include/sys/wait.h
apio cde467ee46
All checks were successful
continuous-integration/drone/pr Build is passing
kernel: Support returning termination signals from waitpid
2023-07-10 20:16:06 +02:00

30 lines
560 B
C

/* sys/wait.h: Functions for waiting. */
#ifndef _SYS_WAIT_H
#define _SYS_WAIT_H
#include <bits/waitpid.h>
#include <sys/types.h>
#define WIFEXITED(ret) (((ret)&_SIGBIT) == 0)
#define WEXITSTATUS(ret) ((ret)&0xff)
#define WIFSIGNALED(ret) (((ret)&_SIGBIT) == _SIGBIT)
#define WTERMSIG(ret) ((ret)&0xff)
#ifdef __cplusplus
extern "C"
{
#endif
/* Wait for a child process to exit. */
pid_t waitpid(pid_t pid, int* status, int options);
/* Wait for any child process to exit. */
pid_t wait(int* status);
#ifdef __cplusplus
}
#endif
#endif