<div dir="ltr">On Tue, Feb 19, 2013 at 9:53 PM, Bryan O'Sullivan <<a href="mailto:bos@serpentine.com">bos@serpentine.com</a>> wrote:<br>><br>> On Tue, Feb 19, 2013 at 11:00 AM, Idan Kamara <<a href="mailto:idankk86@gmail.com">idankk86@gmail.com</a>> wrote:<br>
>><br>>> And here you're waiting for it to finish, but what happens<br>>> if for some reason one of the previous children fails first?<br>><br>> os.wait waits for any process to finish. None of the values in the list of<br>
> pids is used in that loop.<div><br></div><div>Oh, missed that.</div><div><br>>  <br>>><br>>> Why not use select on the children and also spare the thread?<br>><br>> select works on file descriptors, not pids. We need some mechanism to<br>
> catch early-exiting children immediately. We could possibly do that by<br>> having a pipe per child and detect EOF on each pipe, but that's way more<br>> work. (It might turn out to be necessary at some point, e.g. for Windows,<br>
> but I don't want to further complicate the code until I know that said<br>> complexity is necessary.)<br><br></div><div>Makes sense, thanks for clarifying.</div></div>