Home

WIFCONTINUEDstatus

WIFCONTINUEDstatus refers to the interpretation of a status value produced by wait-related system calls in POSIX-compliant operating systems. It describes the condition where a child process has resumed execution after being stopped, typically by a SIGCONT signal. The WIFCONTINUED macro tests a wait status to determine if such a continuation has occurred. This macro is part of the family of status-check macros used with wait, waitpid, and similar functions, alongside WIFEXITED, WIFSIGNALED, and WIFSTOPPED.

Usage and behavior

To detect continued processes, a program must call waitpid (or wait) with the WCONTINUED option enabled. If

Relation to other status checks

WIFCONTINUED is one of several macros used to decode child status values. WIFSTOPPED indicates a child is

Compatibility and portability

WIFCONTINUED and the WCONTINUED option are defined in POSIX.1 and are widely supported on Linux, BSD, and

a
child
is
continued
from
a
stopped
state,
the
resulting
status
value
can
be
inspected
with
WIFCONTINUED(status).
In
that
case,
WIFCONTINUED
evaluates
to
true,
indicating
a
continuation
event.
It
is
important
to
note
that
WIFCONTINUED
is
only
meaningful
when
the
WCONTINUED
flag
is
used
in
the
wait
call;
without
it,
continued
events
may
not
be
reported.
currently
stopped,
WIFEXITED
indicates
normal
termination,
and
WIFSIGNALED
indicates
termination
by
a
signal.
The
corresponding
status
checks
enable
programs
to
implement
robust
job
control
and
process
management
logic:
they
can
distinguish
between
a
process
that
has
stopped,
continued,
or
terminated
and
respond
appropriately.
macOS.
Windows
native
APIs
do
not
provide
this
macro,
though
compatible
environments
like
Cygwin
or
MSYS2
may
expose
it.
Developers
targeting
POSIX
environments
should
include
sys/wait.h
and
use
waitpid
with
the
WCONTINUED
flag
to
rely
on
WIFCONTINUEDstatus.