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

Unified Diff: content/browser/zygote_host_linux.cc

Issue 7006006: Replace OS_LINUX ifdefs with OS_POSIX & !OS_MACOSX, TOOLKIT_USES_GTK, or (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 7 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 | « content/browser/renderer_host/render_widget_host_unittest.cc ('k') | content/browser/zygote_main_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/zygote_host_linux.cc
diff --git a/content/browser/zygote_host_linux.cc b/content/browser/zygote_host_linux.cc
index 4a514362c0307b9a2ff4a1699a9e1ab1ddb9d5b7..0469a979bcca66907e70d163efd4326e3ffbbf58 100644
--- a/content/browser/zygote_host_linux.cc
+++ b/content/browser/zygote_host_linux.cc
@@ -81,7 +81,14 @@ void ZygoteHost::Init(const std::string& sandbox_cmd) {
cmd_line.AppendSwitchASCII(switches::kProcessType, switches::kZygoteProcess);
int fds[2];
+#if defined(OS_FREEBSD) || defined(OS_OPENBSD)
+ // The BSDs often don't support SOCK_SEQPACKET yet, so fall back to
+ // SOCK_DGRAM if necessary.
+ if (socketpair(PF_UNIX, SOCK_SEQPACKET, 0, fds) != 0)
+ CHECK(socketpair(PF_UNIX, SOCK_DGRAM, 0, fds) == 0);
+#else
CHECK(socketpair(PF_UNIX, SOCK_SEQPACKET, 0, fds) == 0);
+#endif
base::file_handle_mapping_vector fds_to_map;
fds_to_map.push_back(std::make_pair(fds[1], 3));
« no previous file with comments | « content/browser/renderer_host/render_widget_host_unittest.cc ('k') | content/browser/zygote_main_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698