sys/wait: add WCOREDUMP defintion

Add the WCOREDUMP() macro to sys/wait.h to indicate whether a terminated
process produced a core dump. This resolves implicit declaration warnings
in LTP kernel testcases and improves POSIX compliance.

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
guoshichao
2025-01-19 17:17:33 +08:00
committed by Xiang Xiao
parent d8717aab78
commit ebd4173a95
+1
View File
@@ -51,6 +51,7 @@
#define WIFSTOPPED(s) (false) /* True: Child is currently stopped */
#define WSTOPSIG(s) (false) /* Return signal number that caused process to stop */
#define WTERMSIG(s) (((s) >> 8) & 0x7f) /* Return signal number that caused process to terminate */
#define WCOREDUMP(s) (((s) >> 8) & 0x80) /* True: Child has produced a core dump */
/* The following symbolic constants are possible values for the options
* argument to waitpid() (1) and/or waitid() (2),