summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Marshall <jmarshall@hey.com>2022-01-18 21:31:27 (GMT)
committerGitHub <noreply@github.com>2022-01-18 21:31:27 (GMT)
commit3852269b91fcc8ee668cd876b3669eba6da5b1ac (patch)
tree481460c0ac43eddf710a0d528b50f2a8a7a84eab
parent16bf9bd157c7bf5f9c60414fa8e0fe5047c55a9b (diff)
downloadcpython-3852269b91fcc8ee668cd876b3669eba6da5b1ac.zip
cpython-3852269b91fcc8ee668cd876b3669eba6da5b1ac.tar.gz
cpython-3852269b91fcc8ee668cd876b3669eba6da5b1ac.tar.bz2
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
-rw-r--r--Doc/library/multiprocessing.rst11
-rw-r--r--Misc/ACKS1
2 files changed, 10 insertions, 2 deletions
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
index 7a1a285..9bb7dd3 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 7f2e94d..04d6a65 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1118,6 +1118,7 @@ Vincent Marchetti
David Marek
Doug Marien
Sven Marnach
+John Marshall
Alex Martelli
Dennis MÃ¥rtensson
Anthony Martin