diff options
Diffstat (limited to 'sandbox/linux/services')
-rw-r--r-- | sandbox/linux/services/broker_process.cc | 14 | ||||
-rw-r--r-- | sandbox/linux/services/broker_process_unittest.cc | 2 | ||||
-rw-r--r-- | sandbox/linux/services/init_process_reaper.cc | 12 |
3 files changed, 14 insertions, 14 deletions
diff --git a/sandbox/linux/services/broker_process.cc b/sandbox/linux/services/broker_process.cc index 0e91c20..316883d 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"; } diff --git a/sandbox/linux/services/broker_process_unittest.cc b/sandbox/linux/services/broker_process_unittest.cc index 4cb9c6f..f163ef9 100644 --- a/sandbox/linux/services/broker_process_unittest.cc +++ b/sandbox/linux/services/broker_process_unittest.cc @@ -48,7 +48,7 @@ class ScopedTemporaryFile { } ~ScopedTemporaryFile() { CHECK_EQ(0, unlink(full_file_name_)); - CHECK_EQ(0, HANDLE_EINTR(close(fd_))); + CHECK_EQ(0, IGNORE_EINTR(close(fd_))); } int fd() const { return fd_; } diff --git a/sandbox/linux/services/init_process_reaper.cc b/sandbox/linux/services/init_process_reaper.cc index f5473ba..2e0b90b 100644 --- a/sandbox/linux/services/init_process_reaper.cc +++ b/sandbox/linux/services/init_process_reaper.cc @@ -33,9 +33,9 @@ bool CreateInitProcessReaper(base::Closure* post_fork_parent_callback) { pid_t child_pid = fork(); if (child_pid == -1) { int close_ret; - close_ret = HANDLE_EINTR(close(sync_fds[0])); + close_ret = IGNORE_EINTR(close(sync_fds[0])); DPCHECK(!close_ret); - close_ret = HANDLE_EINTR(close(sync_fds[1])); + close_ret = IGNORE_EINTR(close(sync_fds[1])); DPCHECK(!close_ret); return false; } @@ -50,7 +50,7 @@ bool CreateInitProcessReaper(base::Closure* post_fork_parent_callback) { CHECK(sigaction(SIGCHLD, &action, NULL) == 0); int close_ret; - close_ret = HANDLE_EINTR(close(sync_fds[0])); + close_ret = IGNORE_EINTR(close(sync_fds[0])); DPCHECK(!close_ret); close_ret = shutdown(sync_fds[1], SHUT_RD); DPCHECK(!close_ret); @@ -58,7 +58,7 @@ bool CreateInitProcessReaper(base::Closure* post_fork_parent_callback) { post_fork_parent_callback->Run(); // Tell the child to continue CHECK(HANDLE_EINTR(send(sync_fds[1], "C", 1, MSG_NOSIGNAL)) == 1); - close_ret = HANDLE_EINTR(close(sync_fds[1])); + close_ret = IGNORE_EINTR(close(sync_fds[1])); DPCHECK(!close_ret); for (;;) { @@ -83,13 +83,13 @@ bool CreateInitProcessReaper(base::Closure* post_fork_parent_callback) { // The child needs to wait for the parent to run the callback to avoid a // race condition. int close_ret; - close_ret = HANDLE_EINTR(close(sync_fds[1])); + close_ret = IGNORE_EINTR(close(sync_fds[1])); DPCHECK(!close_ret); close_ret = shutdown(sync_fds[0], SHUT_WR); DPCHECK(!close_ret); char should_continue; int read_ret = HANDLE_EINTR(read(sync_fds[0], &should_continue, 1)); - close_ret = HANDLE_EINTR(close(sync_fds[0])); + close_ret = IGNORE_EINTR(close(sync_fds[0])); DPCHECK(!close_ret); if (read_ret == 1) return true; |