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

Side by Side Diff: chrome/common/service_process_util_posix.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/multi_process_lock_linux.cc ('k') | chromeos/dbus/debug_daemon_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/service_process_util_posix.h" 5 #include "chrome/common/service_process_util_posix.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/posix/eintr_wrapper.h" 10 #include "base/posix/eintr_wrapper.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 return; 126 return;
127 } 127 }
128 #elif defined(OS_POSIX) 128 #elif defined(OS_POSIX)
129 initializing_lock_.reset(); 129 initializing_lock_.reset();
130 #endif // OS_POSIX 130 #endif // OS_POSIX
131 signal->Signal(); 131 signal->Signal();
132 } 132 }
133 133
134 ServiceProcessState::StateData::~StateData() { 134 ServiceProcessState::StateData::~StateData() {
135 if (sockets_[0] != -1) { 135 if (sockets_[0] != -1) {
136 if (HANDLE_EINTR(close(sockets_[0]))) { 136 if (IGNORE_EINTR(close(sockets_[0]))) {
137 DPLOG(ERROR) << "close"; 137 DPLOG(ERROR) << "close";
138 } 138 }
139 } 139 }
140 if (sockets_[1] != -1) { 140 if (sockets_[1] != -1) {
141 if (HANDLE_EINTR(close(sockets_[1]))) { 141 if (IGNORE_EINTR(close(sockets_[1]))) {
142 DPLOG(ERROR) << "close"; 142 DPLOG(ERROR) << "close";
143 } 143 }
144 } 144 }
145 if (set_action_) { 145 if (set_action_) {
146 if (sigaction(SIGTERM, &old_action_, NULL) < 0) { 146 if (sigaction(SIGTERM, &old_action_, NULL) < 0) {
147 DPLOG(ERROR) << "sigaction"; 147 DPLOG(ERROR) << "sigaction";
148 } 148 }
149 } 149 }
150 g_signal_socket = -1; 150 g_signal_socket = -1;
151 } 151 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 signal_ready.Wait(); 189 signal_ready.Wait();
190 return success; 190 return success;
191 } 191 }
192 192
193 void ServiceProcessState::TearDownState() { 193 void ServiceProcessState::TearDownState() {
194 if (state_) { 194 if (state_) {
195 state_->Release(); 195 state_->Release();
196 state_ = NULL; 196 state_ = NULL;
197 } 197 }
198 } 198 }
OLDNEW
« no previous file with comments | « chrome/common/multi_process_lock_linux.cc ('k') | chromeos/dbus/debug_daemon_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698