mercurial/utils/procutil.py
branchstable
changeset 44978 95c672c07116
parent 44919 065704cbdbdb
child 45000 3fadbdc47aed
equal deleted inserted replaced
44977:afcad425a0b6 44978:95c672c07116
   613                     # chg since the parent process won't die anytime soon.
   613                     # chg since the parent process won't die anytime soon.
   614                     # We use a thread to make the overhead tiny.
   614                     # We use a thread to make the overhead tiny.
   615                     def _do_wait():
   615                     def _do_wait():
   616                         os.waitpid(pid, 0)
   616                         os.waitpid(pid, 0)
   617 
   617 
   618                     threading.Thread(target=_do_wait, daemon=True).start()
   618                     t = threading.Thread(target=_do_wait)
       
   619                     t.daemon = True
       
   620                     t.start()
   619                     return
   621                     return
   620                 # Parent process
   622                 # Parent process
   621                 (_pid, status) = os.waitpid(pid, 0)
   623                 (_pid, status) = os.waitpid(pid, 0)
   622                 if os.WIFEXITED(status):
   624                 if os.WIFEXITED(status):
   623                     returncode = os.WEXITSTATUS(status)
   625                     returncode = os.WEXITSTATUS(status)