mercurial/utils/procutil.py
changeset 45000 3fadbdc47aed
parent 44960 78cafd48b9b2
parent 44978 95c672c07116
child 45039 2bfbd7d2c204
--- a/mercurial/utils/procutil.py	Wed Jun 24 23:17:56 2020 -0700
+++ b/mercurial/utils/procutil.py	Thu Jun 25 10:32:51 2020 -0700
@@ -635,7 +635,9 @@
                     def _do_wait():
                         os.waitpid(pid, 0)
 
-                    threading.Thread(target=_do_wait, daemon=True).start()
+                    t = threading.Thread(target=_do_wait)
+                    t.daemon = True
+                    t.start()
                     return
                 # Parent process
                 (_pid, status) = os.waitpid(pid, 0)