gtpc2m9n | C/C++ Language Support User's Guide |
This macro queries the child termination status provided by the wait and waitpid functions. It determines if the child process exited because it raised a signal that caused it to exit. It is also used with the WTERMSIG macro to determine if the child process exited because of a system error.
Format
#include <sys/wait.h> int WIFSIGNALED(int status);
Normal Return
The WIFSIGNALED macro is always successful.
If the child process for which status was returned by the wait or waitpid function exited because it raised a signal that caused it to exit, the WIFSIGNALED macro evaluates to TRUE and the WTERMSIG macro can be used to determine which signal was raised by the child process. Otherwise, the WIFSIGNALED macro evaluates to FALSE.
Error Return
Not applicable.
Programming Considerations
None.
Examples
See wait-Wait for Status Information from a Child Process for an example of the WIFSIGNALED macro.
Related Information