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

Unified Diff: runtime/bin/fdutils_linux.cc

Issue 2515643004: Fuchsia: Partial implementation of dart:io sockets (Closed)
Patch Set: Formatting Created 4 years, 1 month 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 | « runtime/bin/fdutils_fuchsia.cc ('k') | runtime/bin/fdutils_macos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/fdutils_linux.cc
diff --git a/runtime/bin/fdutils_linux.cc b/runtime/bin/fdutils_linux.cc
index 5a174ee151ca4dbb33754f7c98faabc96c4f91aa..7f4598bcc793b900b25f9b3f33a2bf067069f5b0 100644
--- a/runtime/bin/fdutils_linux.cc
+++ b/runtime/bin/fdutils_linux.cc
@@ -137,6 +137,13 @@ ssize_t FDUtils::WriteToBlocking(int fd, const void* buffer, size_t count) {
return count;
}
+
+void FDUtils::SaveErrorAndClose(intptr_t fd) {
+ int err = errno;
+ VOID_TEMP_FAILURE_RETRY(close(fd));
+ errno = err;
+}
+
} // namespace bin
} // namespace dart
« no previous file with comments | « runtime/bin/fdutils_fuchsia.cc ('k') | runtime/bin/fdutils_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698