Show More
@@ -98,9 +98,20 b' def _posixworker(ui, func, staticargs, a' | |||||
98 | if err.errno != errno.ESRCH: |
|
98 | if err.errno != errno.ESRCH: | |
99 | raise |
|
99 | raise | |
100 | def waitforworkers(blocking=True): |
|
100 | def waitforworkers(blocking=True): | |
101 | for pid in pids: |
|
101 | for pid in pids.copy(): | |
102 | p, st = os.waitpid(pid, 0 if blocking else os.WNOHANG) |
|
102 | p = st = 0 | |
|
103 | while True: | |||
|
104 | try: | |||
|
105 | p, st = os.waitpid(pid, (0 if blocking else os.WNOHANG)) | |||
|
106 | except OSError as e: | |||
|
107 | if e.errno == errno.EINTR: | |||
|
108 | continue | |||
|
109 | elif e.errno == errno.ECHILD: | |||
|
110 | break # ignore ECHILD | |||
|
111 | else: | |||
|
112 | raise | |||
103 | if p: |
|
113 | if p: | |
|
114 | pids.remove(p) | |||
104 | st = _exitstatus(st) |
|
115 | st = _exitstatus(st) | |
105 | if st and not problem[0]: |
|
116 | if st and not problem[0]: | |
106 | problem[0] = st |
|
117 | problem[0] = st |
General Comments 0
You need to be logged in to leave comments.
Login now