mercurial/utils/procutil.py
branchstable
changeset 44812 79f6f856c53f
parent 44781 ed684a82e29b
child 44867 8e8fd938ca07
child 44919 065704cbdbdb
equal deleted inserted replaced
44811:5d309906ed0e 44812:79f6f856c53f
   610                     # it's not a zombie/defunct. This is especially relevant for
   610                     # it's not a zombie/defunct. This is especially relevant for
   611                     # chg since the parent process won't die anytime soon.
   611                     # chg since the parent process won't die anytime soon.
   612                     # We use a thread to make the overhead tiny.
   612                     # We use a thread to make the overhead tiny.
   613                     def _do_wait():
   613                     def _do_wait():
   614                         os.waitpid(pid, 0)
   614                         os.waitpid(pid, 0)
       
   615 
   615                     threading.Thread(target=_do_wait, daemon=True).start()
   616                     threading.Thread(target=_do_wait, daemon=True).start()
   616                     return
   617                     return
   617                 # Parent process
   618                 # Parent process
   618                 (_pid, status) = os.waitpid(pid, 0)
   619                 (_pid, status) = os.waitpid(pid, 0)
   619                 if os.WIFEXITED(status):
   620                 if os.WIFEXITED(status):