]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-35491: Enhance multiprocessing.BaseProcess.__repr__() (GH-11138)
authorVictor Stinner <vstinner@redhat.com>
Fri, 14 Dec 2018 11:58:52 +0000 (12:58 +0100)
committerGitHub <noreply@github.com>
Fri, 14 Dec 2018 11:58:52 +0000 (12:58 +0100)
commit7acd50ad8b2a4fe132f7b26980ed3cd209b7ea12
tree2a08755864f9da7648ba66f58ecebd081f966f98
parentcb0f5e29e37c081e9bba91a9858370e2504e9e8e
bpo-35491: Enhance multiprocessing.BaseProcess.__repr__() (GH-11138)

* Add the pid and parent pid to multiprocessing.BaseProcess.__repr__().
* Add negative sign (ex: "-SIGTERM") to exitcode (process killed
  by a signal)
* Only call _popen.poll() once.

Example:
  <ForkProcess(ForkPoolWorker-1, started daemon)>
becomes:
  <ForkProcess name='ForkPoolWorker-1' pid=12449 parent=12448 started daemon>

Example:
  <ForkProcess(ForkPoolWorker-1, stopped[SIGTERM] daemon)>
becomes:
  <ForkProcess name='ForkPoolWorker-1' pid=12960 parent=12959 stopped exitcode=-SIGTERM daemon>
Doc/library/multiprocessing.rst
Lib/multiprocessing/process.py
Misc/NEWS.d/next/Library/2018-12-14-12-12-15.bpo-35491.jHsNOU.rst [new file with mode: 0644]