Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2758)

Unified Diff: runtime/bin/directory_linux.cc

Issue 600273004: Remove the assumption that stat64 and lstat64 cannot return EINTR on Linux (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/bin/file_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/directory_linux.cc
diff --git a/runtime/bin/directory_linux.cc b/runtime/bin/directory_linux.cc
index 99dc1c6c236a8108416acd4bce024649cab0f3d5..d150bf276daff920e6a9b55ae0271bff133564c1 100644
--- a/runtime/bin/directory_linux.cc
+++ b/runtime/bin/directory_linux.cc
@@ -134,7 +134,7 @@ ListType DirectoryListingEntry::Next(DirectoryListing* listing) {
// the file pointed to.
struct stat64 entry_info;
int stat_success;
- stat_success = NO_RETRY_EXPECTED(
+ stat_success = TEMP_FAILURE_RETRY(
lstat64(listing->path_buffer().AsString(), &entry_info));
if (stat_success == -1) {
return kListError;
@@ -153,7 +153,7 @@ ListType DirectoryListingEntry::Next(DirectoryListing* listing) {
}
previous = previous->next;
}
- stat_success = NO_RETRY_EXPECTED(
+ stat_success = TEMP_FAILURE_RETRY(
stat64(listing->path_buffer().AsString(), &entry_info));
if (stat_success == -1) {
// Report a broken link as a link, even if follow_links is true.
@@ -235,7 +235,7 @@ static bool DeleteRecursively(PathBuffer* path) {
// Do not recurse into links for deletion. Instead delete the link.
// If it's a file, delete it.
struct stat64 st;
- if (NO_RETRY_EXPECTED(lstat64(path->AsString(), &st)) == -1) {
+ if (TEMP_FAILURE_RETRY(lstat64(path->AsString(), &st)) == -1) {
return false;
} else if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {
return (NO_RETRY_EXPECTED(unlink(path->AsString())) == 0);
@@ -283,7 +283,7 @@ static bool DeleteRecursively(PathBuffer* path) {
// readdir_r. For those we use lstat to determine the entry
// type.
struct stat64 entry_info;
- if (NO_RETRY_EXPECTED(lstat64(path->AsString(), &entry_info)) == -1) {
+ if (TEMP_FAILURE_RETRY(lstat64(path->AsString(), &entry_info)) == -1) {
break;
}
path->Reset(path_length);
@@ -316,7 +316,7 @@ static bool DeleteRecursively(PathBuffer* path) {
Directory::ExistsResult Directory::Exists(const char* dir_name) {
struct stat64 entry_info;
- int success = NO_RETRY_EXPECTED(stat64(dir_name, &entry_info));
+ int success = TEMP_FAILURE_RETRY(stat64(dir_name, &entry_info));
if (success == 0) {
if (S_ISDIR(entry_info.st_mode)) {
return EXISTS;
« no previous file with comments | « no previous file | runtime/bin/file_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698