diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2023-03-25 16:45:10 +0100 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2023-03-27 16:26:10 -0700 |
commit | 8c934d4822c77818d53f5f4c948c3ace6fda1505 (patch) | |
tree | f8b62ed83af6e47baa4d84ba9ab4fd8eb7d22846 /tools/include | |
parent | 00b7262896af69233c9c4593e6a7251adcb1e5f4 (diff) |
tools/nolibc: add helpers for wait() signal exits
These are useful for users and will also be used in an upcoming
testcase.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/include')
-rw-r--r-- | tools/include/nolibc/types.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/include/nolibc/types.h b/tools/include/nolibc/types.h index 10823e5ac44b..aedd7d9e3f64 100644 --- a/tools/include/nolibc/types.h +++ b/tools/include/nolibc/types.h @@ -97,6 +97,8 @@ /* Macros used on waitpid()'s return status */ #define WEXITSTATUS(status) (((status) & 0xff00) >> 8) #define WIFEXITED(status) (((status) & 0x7f) == 0) +#define WTERMSIG(status) ((status) & 0x7f) +#define WIFSIGNALED(status) ((status) - 1 < 0xff) /* waitpid() flags */ #define WNOHANG 1 |