This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit ebd4173a953995ded884f9c871f063c966a5337e
Author: guoshichao <[email protected]>
AuthorDate: Sun Jan 19 17:17:33 2025 +0800

    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 <[email protected]>
---
 include/sys/wait.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/sys/wait.h b/include/sys/wait.h
index 1b67e182440..4f653a8fbe4 100644
--- a/include/sys/wait.h
+++ b/include/sys/wait.h
@@ -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),

Reply via email to