WIFSTOPPED
WIFSTOPPED is a macro used in POSIX-compatible systems (notably Linux) to inspect the wait status of a child process. It is defined in sys/wait.h and is used after calls such as wait, waitpid, or waitid to determine whether a child has been stopped by a signal rather than having exited or been terminated by a signal.
When a wait-related call returns a status value, WIFSTOPPED(status) evaluates to nonzero if the child is currently
WIFSTOPPED is distinct from WIFEXITED and WIFSIGNALED, which indicate normal termination or termination by a signal,
In practice, programs that manage multiple processes, such as shells or debuggers, may use WIFSTOPPED alongside
Notes: WIFSTOPPED relies on the encoding of the wait status provided by the kernel. Proper handling typically