Show More
@@ -97,9 +97,11 b' def _posixworker(ui, func, staticargs, a' | |||||
97 | except OSError as err: |
|
97 | except OSError as err: | |
98 | if err.errno != errno.ESRCH: |
|
98 | if err.errno != errno.ESRCH: | |
99 | raise |
|
99 | raise | |
100 | def waitforworkers(): |
|
100 | def waitforworkers(blocking=True): | |
101 | for pid in pids: |
|
101 | for pid in pids: | |
102 | st = _exitstatus(os.waitpid(pid, 0)[1]) |
|
102 | p, st = os.waitpid(pid, 0 if blocking else os.WNOHANG) | |
|
103 | if p: | |||
|
104 | st = _exitstatus(st) | |||
103 | if st and not problem[0]: |
|
105 | if st and not problem[0]: | |
104 | problem[0] = st |
|
106 | problem[0] = st | |
105 | killworkers() |
|
107 | killworkers() |
General Comments 0
You need to be logged in to leave comments.
Login now