[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230325154516.7995-3-w@1wt.eu>
Date: Sat, 25 Mar 2023 16:45:10 +0100
From: Willy Tarreau <w@....eu>
To: "Paul E. McKenney" <paulmck@...nel.org>
Cc: linux@...ssschuh.net, linux-kernel@...r.kernel.org,
Willy Tarreau <w@....eu>
Subject: [PATCH 2/8] tools/nolibc: add helpers for wait() signal exits
From: Thomas Weißschuh <linux@...ssschuh.net>
These are useful for users and will also be used in an upcoming
testcase.
Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
Signed-off-by: Willy Tarreau <w@....eu>
---
tools/include/nolibc/types.h | 2 ++
1 file changed, 2 insertions(+)
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
--
2.17.5
Powered by blists - more mailing lists