gtpc2m9m | C/C++ Language Support User's Guide |
This macro queries the child termination status provided by the wait and waitpid functions, and determines whether the child process ended normally.
Format
#include <sys/wait.h> int WIFEXITED(int status);
Normal Return
The WIFEXITED macro is always successful.
If the child process for which status was returned by the wait or waitpid function exited normally, the WIFEXITED macro evaluates to TRUE and the WEXITSTATUS macro is used to query the exit code of the child process. Otherwise, the WIFEXITED 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 WIFEXITED macro.
Related Information