Merge branch 'signal-dev'
[lunaix-os.git] / lunaix-os / includes / lunaix / types.h
index ed59da3fde2ae17410006f728d2966347702ea87..028792a6375cb92a823776b511bb908bdd0fb57e 100644 (file)
@@ -3,6 +3,16 @@
 
 #include <stdint.h>
 
+#define PROCTERM 0x10000
+#define PROCSTOP 0x20000
+
+#define WNOHANG 1
+#define WUNTRACED 2
+#define WEXITSTATUS(wstatus) ((wstatus & 0xffff))
+#define WIFSTOPPED(wstatus) ((wstatus & PROCSTOP))
+#define WIFEXITED(wstatus)                                                     \
+    ((wstatus & PROCTERM) && ((short)WEXITSTATUS(wstatus) >= 0))
+
 typedef int32_t pid_t;
 
 #endif /* __LUNAIX_TYPES_H */