[Support/LockFileManager] Make the LockFileManager more robust against races.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 6 Mar 2014 17:37:10 +0000 (17:37 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 6 Mar 2014 17:37:10 +0000 (17:37 +0000)
commitd25733bebcccb671e5b33283eabdf6d0a66ee5db
tree34d85fe2c0290c70527171250e2dd857143b5636
parent7b95c0d529c9160b6678a14e2f8885d1cf08cd4f
[Support/LockFileManager] Make the LockFileManager more robust against races.

There was a race where:
- The LockFileManager tries to own the lock file and fails.
- The other owner then releases and removes the lock file.
- The LockFileManager tries to read the owner info from the lock file but fails now.

In such a case have LockFileManager try to get ownership again, instead of error'ing out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203138 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/LockFileManager.cpp