mercurial/utils/procutil.py
changeset 45000 3fadbdc47aed
parent 44960 78cafd48b9b2
parent 44978 95c672c07116
child 45039 2bfbd7d2c204
equal deleted inserted replaced
44999:d1471dbbdd63 45000:3fadbdc47aed
   633                     # chg since the parent process won't die anytime soon.
   633                     # chg since the parent process won't die anytime soon.
   634                     # We use a thread to make the overhead tiny.
   634                     # We use a thread to make the overhead tiny.
   635                     def _do_wait():
   635                     def _do_wait():
   636                         os.waitpid(pid, 0)
   636                         os.waitpid(pid, 0)
   637 
   637 
   638                     threading.Thread(target=_do_wait, daemon=True).start()
   638                     t = threading.Thread(target=_do_wait)
       
   639                     t.daemon = True
       
   640                     t.start()
   639                     return
   641                     return
   640                 # Parent process
   642                 # Parent process
   641                 (_pid, status) = os.waitpid(pid, 0)
   643                 (_pid, status) = os.waitpid(pid, 0)
   642                 if os.WIFEXITED(status):
   644                 if os.WIFEXITED(status):
   643                     returncode = os.WEXITSTATUS(status)
   645                     returncode = os.WEXITSTATUS(status)