initial check-in, version 0.5.0
[musl] / include / bits / wexitstatus.h
1 #ifndef WEXITSTATUS
2 #define WEXITSTATUS(s) (((s) & 0xff00) >> 8)
3 #define WTERMSIG(s) ((s) & 0x7f)
4 #define WSTOPSIG(s) WEXITSTATUS(s)
5 #define WCOREDUMP(s) ((s) & 0x80)
6 #define WIFEXITED(s) (!WTERMSIG(s))
7 #define WIFSTOPPED(s) (((s) & 0xff) == 0x7f)
8 #define WIFSIGNALED(s) (!WIFSTOPPED(s) && !WIFEXITED(s))
9 #endif