(libc.info.gz) Process Completion Status
Info Catalog
(libc.info.gz) Process Completion
(libc.info.gz) Processes
(libc.info.gz) BSD Wait Functions
26.7 Process Completion Status
==============================
If the exit status value ( Program Termination) of the child
process is zero, then the status value reported by 'waitpid' or 'wait'
is also zero. You can test for other kinds of information encoded in
the returned status value using the following macros. These macros are
defined in the header file 'sys/wait.h'.
-- Macro: int WIFEXITED (int STATUS)
Preliminary: | MT-Safe | AS-Safe | AC-Safe | POSIX Safety
Concepts.
This macro returns a nonzero value if the child process terminated
normally with 'exit' or '_exit'.
-- Macro: int WEXITSTATUS (int STATUS)
Preliminary: | MT-Safe | AS-Safe | AC-Safe | POSIX Safety
Concepts.
If 'WIFEXITED' is true of STATUS, this macro returns the low-order
8 bits of the exit status value from the child process. Exit
Status.
-- Macro: int WIFSIGNALED (int STATUS)
Preliminary: | MT-Safe | AS-Safe | AC-Safe | POSIX Safety
Concepts.
This macro returns a nonzero value if the child process terminated
because it received a signal that was not handled. Signal
Handling.
-- Macro: int WTERMSIG (int STATUS)
Preliminary: | MT-Safe | AS-Safe | AC-Safe | POSIX Safety
Concepts.
If 'WIFSIGNALED' is true of STATUS, this macro returns the signal
number of the signal that terminated the child process.
-- Macro: int WCOREDUMP (int STATUS)
Preliminary: | MT-Safe | AS-Safe | AC-Safe | POSIX Safety
Concepts.
This macro returns a nonzero value if the child process terminated
and produced a core dump.
-- Macro: int WIFSTOPPED (int STATUS)
Preliminary: | MT-Safe | AS-Safe | AC-Safe | POSIX Safety
Concepts.
This macro returns a nonzero value if the child process is stopped.
-- Macro: int WSTOPSIG (int STATUS)
Preliminary: | MT-Safe | AS-Safe | AC-Safe | POSIX Safety
Concepts.
If 'WIFSTOPPED' is true of STATUS, this macro returns the signal
number of the signal that caused the child process to stop.
Info Catalog
(libc.info.gz) Process Completion
(libc.info.gz) Processes
(libc.info.gz) BSD Wait Functions
automatically generated by
info2html