Mercurial > hg
comparison mercurial/utils/procutil.py @ 45000:3fadbdc47aed
merge with stable
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 25 Jun 2020 10:32:51 -0700 |
parents | 78cafd48b9b2 95c672c07116 |
children | 2bfbd7d2c204 |
comparison
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) |