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

Unified Diff: runtime/bin/fdutils_linux.cc

Issue 165723007: Move signal_blocker to platform and use it by default in TEMP_FAILURE_RETRY. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tiny fix. Created 6 years, 9 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 | « runtime/bin/fdutils_android.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 3bb1ce1f0affcd11b80b6b1b3817b2b88c68bf73..e8984ddd9179da2ea9c5a06337483f24698d232a 100644
--- a/runtime/bin/fdutils_linux.cc
+++ b/runtime/bin/fdutils_linux.cc
@@ -11,6 +11,7 @@
#include <sys/ioctl.h> // NOLINT
#include "bin/fdutils.h"
+#include "platform/signal_blocker.h"
namespace dart {
@@ -18,12 +19,12 @@ namespace bin {
bool FDUtils::SetCloseOnExec(intptr_t fd) {
intptr_t status;
- status = TEMP_FAILURE_RETRY(fcntl(fd, F_GETFD));
+ status = NO_RETRY_EXPECTED(fcntl(fd, F_GETFD));
if (status < 0) {
return false;
}
status |= FD_CLOEXEC;
- if (TEMP_FAILURE_RETRY(fcntl(fd, F_SETFD, status)) < 0) {
+ if (NO_RETRY_EXPECTED(fcntl(fd, F_SETFD, status)) < 0) {
return false;
}
return true;
@@ -32,12 +33,12 @@ bool FDUtils::SetCloseOnExec(intptr_t fd) {
static bool SetBlockingHelper(intptr_t fd, bool blocking) {
intptr_t status;
- status = TEMP_FAILURE_RETRY(fcntl(fd, F_GETFL));
+ status = NO_RETRY_EXPECTED(fcntl(fd, F_GETFL));
if (status < 0) {
return false;
}
status = blocking ? (status & ~O_NONBLOCK) : (status | O_NONBLOCK);
- if (TEMP_FAILURE_RETRY(fcntl(fd, F_SETFL, status)) < 0) {
+ if (NO_RETRY_EXPECTED(fcntl(fd, F_SETFL, status)) < 0) {
return false;
}
return true;
@@ -56,7 +57,7 @@ bool FDUtils::SetBlocking(intptr_t fd) {
bool FDUtils::IsBlocking(intptr_t fd, bool* is_blocking) {
intptr_t status;
- status = TEMP_FAILURE_RETRY(fcntl(fd, F_GETFL));
+ status = NO_RETRY_EXPECTED(fcntl(fd, F_GETFL));
if (status < 0) {
return false;
}
@@ -67,7 +68,7 @@ bool FDUtils::IsBlocking(intptr_t fd, bool* is_blocking) {
intptr_t FDUtils::AvailableBytes(intptr_t fd) {
int available; // ioctl for FIONREAD expects an 'int*' argument.
- int result = TEMP_FAILURE_RETRY(ioctl(fd, FIONREAD, &available));
+ int result = NO_RETRY_EXPECTED(ioctl(fd, FIONREAD, &available));
if (result < 0) {
return result;
}
« no previous file with comments | « runtime/bin/fdutils_android.cc ('k') | runtime/bin/fdutils_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698