posix_spawn should retry upon EINTR
authorJF Bastien <jfbastien@apple.com>
Wed, 24 Apr 2019 23:24:53 +0000 (23:24 +0000)
committerJF Bastien <jfbastien@apple.com>
Wed, 24 Apr 2019 23:24:53 +0000 (23:24 +0000)
commitfb742da34c1393550daf6073374051b16cea6686
tree1e18728973764bbfa3e4f724c313df4dbd66eb8a
parent54763e44532feb72bf773260b377f2a0bacf0e0c
posix_spawn should retry upon EINTR

Summary:
We've seen cases of bots failing with:
  clang: error: unable to execute command: posix_spawn failed: Interrupted system call

Add a small retry loop to posix_spawn in case this happens. Don't retry too much in case there's some systemic problem going on, but retry a few times.
<rdar://problem/50181448>

Reviewers: Bigcheese, arphaman

Subscribers: jkorous, dexonsmith, kristina, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D61096

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