[PATCH] fix bug where sys::Wait could wait on wrong pid
dreynaud at apple.com
Fri Sep 5 10:15:39 PDT 2014
I see no reason to set ChildPid to -1 when WaitUntilTerminates is true.
If there was some other unwaited-for child process that terminates before PI.Pid, its pid would be returned instead of PI.Pid so the function would return "Error waiting for child process", even though errno is 0.
By making we wait on the right process, this works as expected.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 585 bytes
Desc: not available
More information about the llvm-commits