title: What happens to wait() if multiple child process terminate simultaneously?
body: <p>Say I create a process with multiple child process and I call <code>wait()</code> in the main process. If one child terminates, its <code>pid</code> is returned. But what happens if a couple of child process terminate simultaneously? The call should return with one of them, and a second call should return with the other, right? Is there a particular order in which they will return (maybe there is a precedence to the child with lower pid)?</p>