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

Unified Diff: chrome/browser/process_singleton_linux.cc

Issue 100225: POSIX: Add a macro for handling EINTR. (Closed)
Patch Set: ... Created 11 years, 8 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
Index: chrome/browser/process_singleton_linux.cc
diff --git a/chrome/browser/process_singleton_linux.cc b/chrome/browser/process_singleton_linux.cc
index 4fba3734003cba54a0188fa680e79d8ce5e0c077..685b9f008f73f2d60dd6c59a73871fbe6f5705d3 100644
--- a/chrome/browser/process_singleton_linux.cc
+++ b/chrome/browser/process_singleton_linux.cc
@@ -9,6 +9,7 @@
#include <sys/socket.h>
#include <sys/un.h>
+#include "base/eintr_wrappers.h"
#include "base/logging.h"
#include "base/string_util.h"
#include "chrome/common/chrome_constants.h"
@@ -25,7 +26,8 @@ bool ProcessSingleton::NotifyOtherProcess() {
sockaddr_un addr;
SetupSocket(&sock, &addr);
- if (connect(sock, reinterpret_cast<sockaddr*>(&addr), sizeof(addr)) < 0 &&
+ if (HANDLE_EINTR(connect(sock, reinterpret_cast<sockaddr*>(&addr),
+ sizeof(addr))) < 0 &&
(errno == ENOENT || errno == ECONNREFUSED)) {
return false; // Tell the caller there's nobody to notify.
}

Powered by Google App Engine
This is Rietveld 408576698