From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 18 Jan 2022 21:51:30 +0000 (-0800) Subject: bpo-45554: Document multiprocessing.Process.exitcode values (GH-30142) X-Git-Tag: v3.10.3~209 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4449a1694a0fd2c63fcef5eb7d0ad1d7dfbb6077;p=thirdparty%2FPython%2Fcpython.git bpo-45554: Document multiprocessing.Process.exitcode values (GH-30142) This addresses [bpo-45554]() by expanding the `exitcode` documentation to also describe what `exitcode` will be in cases of normal termination, `sys.exit()` called, and on uncaught exceptions. Automerge-Triggered-By: GH:pitrou (cherry picked from commit 3852269b91fcc8ee668cd876b3669eba6da5b1ac) Co-authored-by: John Marshall --- diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst index e81dd7e648f7..e0954b285b37 100644 --- a/Doc/library/multiprocessing.rst +++ b/Doc/library/multiprocessing.rst @@ -569,8 +569,15 @@ The :mod:`multiprocessing` package mostly replicates the API of the .. attribute:: exitcode The child's exit code. This will be ``None`` if the process has not yet - terminated. A negative value *-N* indicates that the child was terminated - by signal *N*. + terminated. + + If the child's :meth:`run` method returned normally, the exit code + will be 0. If it terminated via :func:`sys.exit` with an integer + argument *N*, the exit code will be *N*. + + If the child terminated due to an exception not caught within + :meth:`run`, the exit code will be 1. If it was terminated by + signal *N*, the exit code will be the negative value *-N*. .. attribute:: authkey diff --git a/Misc/ACKS b/Misc/ACKS index 94b0ed0b241c..9292bdc8dc73 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -1115,6 +1115,7 @@ Vincent Marchetti David Marek Doug Marien Sven Marnach +John Marshall Alex Martelli Dennis MÃ¥rtensson Anthony Martin