tools/nolibc/types: define EXIT_SUCCESS and EXIT_FAILURE
authorWilly Tarreau <w@1wt.eu>
Mon, 7 Feb 2022 16:23:34 +0000 (17:23 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 21 Apr 2022 00:05:44 +0000 (17:05 -0700)
These ones are found in some examples found in man pages and ease
portability tests.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/include/nolibc/types.h

index b1bff5e717b62437d34589ecb7bb91621cd71066..e0749dc0bd068cc68e2bc15f2328b8e35daa7d05 100644 (file)
@@ -71,6 +71,9 @@
 #define WEXITSTATUS(status) (((status) & 0xff00) >> 8)
 #define WIFEXITED(status)   (((status) & 0x7f) == 0)
 
+/* standard exit() codes */
+#define EXIT_SUCCESS 0
+#define EXIT_FAILURE 1
 
 /* for select() */
 typedef struct {