Merge changes from topic "lpdumpd"

am: f959fffc1c

Change-Id: I024ccc86df450b21115b76b8062975f2ba18378e
This commit is contained in:
Yifan Hong 2019-03-26 14:29:48 -07:00 committed by android-build-merger
commit ee7da7c711

View file

@ -385,7 +385,12 @@ bool Readlink(const std::string& path, std::string* result) {
bool Realpath(const std::string& path, std::string* result) {
result->clear();
char* realpath_buf = realpath(path.c_str(), nullptr);
// realpath may exit with EINTR. Retry if so.
char* realpath_buf = nullptr;
do {
realpath_buf = realpath(path.c_str(), nullptr);
} while (realpath_buf == nullptr && errno == EINTR);
if (realpath_buf == nullptr) {
return false;
}