WEXITSTATUSstatus
WEXITSTATUS is a macro defined in the POSIX standard used to extract the exit status from a status value returned by wait, waitpid, and related functions. It provides access to the argument given to exit() or the value returned from main, as encoded in the child’s termination status.
Usage and semantics: After a successful wait call, a status integer is filled. The WIFEXITED(status) macro can
Relation to other macros: WEXITSTATUS is part of a family of macros for decoding process termination information
Implementation notes: WEXITSTATUS is typically defined as a macro in <sys/wait.h> and operates on the status