• Victor Stinner's avatar
    bpo-35491: Enhance multiprocessing.BaseProcess.__repr__() (GH-11138) · 7acd50ad
    Victor Stinner authored
    * 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>
    7acd50ad
2018-12-14-12-12-15.bpo-35491.jHsNOU.rst 257 Bytes