Mercurial > public > mercurial-scm > hg
comparison mercurial/worker.py @ 30422:0e6ce6313e47
worker: fix missed break on successful waitpid()
Follow-up for 5069a8a40b1b.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 17 Nov 2016 21:43:01 +0900 |
parents | c27614f2dec1 |
children | 237b2883cbd8 |
comparison
equal
deleted
inserted
replaced
30421:21772a6a7861 | 30422:0e6ce6313e47 |
---|---|
100 for pid in pids.copy(): | 100 for pid in pids.copy(): |
101 p = st = 0 | 101 p = st = 0 |
102 while True: | 102 while True: |
103 try: | 103 try: |
104 p, st = os.waitpid(pid, (0 if blocking else os.WNOHANG)) | 104 p, st = os.waitpid(pid, (0 if blocking else os.WNOHANG)) |
105 break | |
105 except OSError as e: | 106 except OSError as e: |
106 if e.errno == errno.EINTR: | 107 if e.errno == errno.EINTR: |
107 continue | 108 continue |
108 elif e.errno == errno.ECHILD: | 109 elif e.errno == errno.ECHILD: |
109 break # ignore ECHILD | 110 break # ignore ECHILD |