Lines Matching refs:EXIT_BITS
70 #define EXIT_BITS 8 /* # exit status bits */
73 #define EXIT_QUIT ((1<<(EXIT_BITS))-1) /* parent should quit */
74 #define EXIT_NOTFOUND ((1<<(EXIT_BITS-1))-1) /* command not found */
75 #define EXIT_NOEXEC ((1<<(EXIT_BITS-1))-2) /* other exec error */
77 #define EXIT_CODE(x) ((x)&((1<<EXIT_BITS)-1))
78 #define EXIT_CORE(x) (EXIT_CODE(x)|(1<<EXIT_BITS)|(1<<(EXIT_BITS-1)))
79 #define EXIT_TERM(x) (EXIT_CODE(x)|(1<<EXIT_BITS))
82 * NOTE: for compatibility the following work for EXIT_BITS={7,8}
85 #define EXIT_STATUS(x) (((x)&((1<<(EXIT_BITS-2))-1))?(x):EXIT_CODE((x)>>EXIT_BITS))
87 #define EXITED_CORE(x) (((x)&((1<<EXIT_BITS)|(1<<(EXIT_BITS-1))))==((1<<EXIT_BITS)|(1<<(EXIT_BITS-1)))||((x)&((1<<(EXIT_BITS-1))|(1<<(EXIT_BITS-2))))==((1<<(EXIT_BITS-1))|(1<<(EXIT_BITS-2))))
88 #define EXITED_TERM(x) ((x)&((1<<EXIT_BITS)|(1<<(EXIT_BITS-1))))