Python 3.3+Exceptionsexception
ChildProcessError
built-in exceptions
An operation on a child process failed (a subclass of OSError).
Syntax
raise ChildProcessError
It surfaces from the ECHILD errno: os.wait() or os.waitpid() was called when no child process was left, or its status had already been collected. Code built on subprocess rarely sees it, because Popen tracks the child's exit status itself — so when it does appear, something is usually waiting on the same child twice or from two different places.
Examples
try:
raise ChildProcessError
except ChildProcessError as e:
print(type(e).__name__) # → ChildProcessError
See also
Open in the full glossarydocs.python.orgReport an inaccuracy