Merge changes from topic "lpdumpd" am: f959fffc1c
am: ee7da7c711
Change-Id: Ia75e9367484478b5df5482ce949b9c6b7a89f9c7
This commit is contained in:
commit
53c3f30d90
1 changed files with 6 additions and 1 deletions
|
|
@ -385,7 +385,12 @@ bool Readlink(const std::string& path, std::string* result) {
|
||||||
bool Realpath(const std::string& path, std::string* result) {
|
bool Realpath(const std::string& path, std::string* result) {
|
||||||
result->clear();
|
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) {
|
if (realpath_buf == nullptr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue