• Victor Stinner's avatar
    bpo-35491: Enhance multiprocessing.BaseProcess.__repr__() (GH-11138) · 7acd50ad
    Victor Stinner yazdı
    * 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
process.py 10.5 KB