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

Unified Diff: sandbox/linux/services/broker_process.cc

Issue 100253002: Don't HANDLE_EINTR(close). Either IGNORE_EINTR(close) or just close. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years 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 | « sandbox/linux/seccomp-bpf/trap.cc ('k') | sandbox/linux/services/broker_process_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/services/broker_process.cc
diff --git a/sandbox/linux/services/broker_process.cc b/sandbox/linux/services/broker_process.cc
index 0e91c20603a6657fc7223b92ddf69c570d59585f..316883d260a5c43dc3ecb95909a7efd10cd8ad23 100644
--- a/sandbox/linux/services/broker_process.cc
+++ b/sandbox/linux/services/broker_process.cc
@@ -131,7 +131,7 @@ BrokerProcess::BrokerProcess(int denied_errno,
BrokerProcess::~BrokerProcess() {
if (initialized_ && ipc_socketpair_ != -1) {
- void (HANDLE_EINTR(close(ipc_socketpair_)));
+ close(ipc_socketpair_);
}
}
@@ -148,13 +148,13 @@ bool BrokerProcess::Init(bool (*sandbox_callback)(void)) {
int child_pid = fork();
if (child_pid == -1) {
- ignore_result(HANDLE_EINTR(close(socket_pair[0])));
- ignore_result(HANDLE_EINTR(close(socket_pair[1])));
+ close(socket_pair[0]);
+ close(socket_pair[1]);
return false;
}
if (child_pid) {
// We are the parent and we have just forked our broker process.
- ignore_result(HANDLE_EINTR(close(socket_pair[0])));
+ close(socket_pair[0]);
// We should only be able to write to the IPC channel. We'll always send
// a new file descriptor to receive the reply on.
shutdown(socket_pair[1], SHUT_RD);
@@ -165,7 +165,7 @@ bool BrokerProcess::Init(bool (*sandbox_callback)(void)) {
return true;
} else {
// We are the broker.
- ignore_result(HANDLE_EINTR(close(socket_pair[1])));
+ close(socket_pair[1]);
// We should only be able to read from this IPC channel. We will send our
// replies on a new file descriptor attached to the requests.
shutdown(socket_pair[0], SHUT_WR);
@@ -329,7 +329,7 @@ bool BrokerProcess::HandleRequest() const {
r = false;
break;
}
- int ret = HANDLE_EINTR(close(temporary_ipc));
+ int ret = IGNORE_EINTR(close(temporary_ipc));
DCHECK(!ret) << "Could not close temporary IPC channel";
return r;
}
@@ -374,7 +374,7 @@ bool BrokerProcess::HandleRemoteCommand(IPCCommands command_type, int reply_ipc,
// Close anything we have opened in this process.
for (std::vector<int>::iterator it = opened_files.begin();
it < opened_files.end(); ++it) {
- int ret = HANDLE_EINTR(close(*it));
+ int ret = IGNORE_EINTR(close(*it));
DCHECK(!ret) << "Could not close file descriptor";
}
« no previous file with comments | « sandbox/linux/seccomp-bpf/trap.cc ('k') | sandbox/linux/services/broker_process_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698