lldb can interrupt waitpid, so EINTR shouldn't be an error. This fixes the case
authorJulien Lerouge <jlerouge@apple.com>
Fri, 27 Jun 2014 18:02:54 +0000 (18:02 +0000)
committerJulien Lerouge <jlerouge@apple.com>
Fri, 27 Jun 2014 18:02:54 +0000 (18:02 +0000)
commita67d14f5a346fa6ad110bbdd4a9c3b87a3c08e4d
tree68830bbd1e14108c364949edbe06206937df289e
parentd782d0566681de27782dd5cd175624a60f7b0644
lldb can interrupt waitpid, so EINTR shouldn't be an error. This fixes the case
where there is no timeout. In the case where there is a timeout though, the
code is still wrong since it doesn't check that the alarm really went off.

Without this patch, I cannot debug a program that forks itself using
sys::ExecuteAndWait with lldb.

llvm-svn: 211918
llvm/lib/Support/Unix/Program.inc