Home

ECHILD

ECHILD is an errno value used by POSIX-compliant systems to indicate that a process has no child processes to wait for. It is defined in errno.h and is commonly reported by wait, waitpid, and waitid when there are no unwaited-for child processes left for the calling process.

The typical meaning of ECHILD is that the calling process either has no children at all or

Strerror(ECHILD) on most systems yields "No child processes." The value of ECHILD is implementation-defined and may

In summary, ECHILD signals that there are no child processes left to wait for in the calling

has
already
waited
for
all
of
its
children.
In
this
case,
a
wait-related
system
call
returns
−1
and
sets
errno
to
ECHILD.
This
differs
from
ESRCH,
which
means
that
a
specific
process
identifier
does
not
exist
or
is
not
a
child
of
the
caller.
In
other
words,
ECHILD
is
about
the
absence
of
waiting
targets
(children),
not
the
absence
of
the
process
indicated
by
a
particular
PID.
differ
across
platforms,
but
its
purpose
remains
the
same
in
errno-based
error
reporting.
Developers
typically
check
for
ECHILD
to
detect
that
there
are
no
more
child
processes
to
reap
and
to
handle
such
situations
gracefully,
for
example
by
stopping
a
loop
that
waits
for
child
state
changes
or
by
performing
alternate
work.
process,
distinguishing
it
from
errors
that
indicate
an
invalid
or
nonexistent
target.