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

Unified Diff: chrome/common/nacl_helper_linux.h

Issue 7395024: For Linux, create a ZygoteForkDelegate that uses the nacl_helper executable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Presubmit: fixing a copyright header. Created 9 years, 5 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 | « chrome/common/nacl_fork_delegate_linux.h ('k') | chrome/common/nacl_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/nacl_helper_linux.h
diff --git a/chrome/common/nacl_helper_linux.h b/chrome/common/nacl_helper_linux.h
new file mode 100644
index 0000000000000000000000000000000000000000..a7e916d7ab84e5e84badd4deae5659178918dd9f
--- /dev/null
+++ b/chrome/common/nacl_helper_linux.h
@@ -0,0 +1,46 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_COMMON_NACL_HELPER_LINUX_H_
+#define CHROME_COMMON_NACL_HELPER_LINUX_H_
+#pragma once
+
+// A mini-zygote specifically for Native Client. This file defines
+// constants used to implement communication between the nacl_helper
+// process and the Chrome zygote.
+
+// Used by Helper to tell Zygote it has started successfully.
+#define kNaClHelperStartupAck "NACLHELPER_OK"
+// Used by Zygote to ask Helper to fork a new NaCl loader.
+#define kNaClForkRequest "NACLFORK"
+
+// The next set of constants define global Linux file descriptors.
+// For communications between NaCl loader and browser.
+// See also content/common/zygote_main_linux.cc and
+// http://code.google.com/p/chromium/wiki/LinuxZygote
+#define kNaClBrowserDescriptor 3
+// For communications between NaCl loader and zygote.
+// We put the kNaClZygoteDescriptor on 3 together with the
+// kNaClBrowserDescriptor. They are never used at the same
+// time, and this prevents /dev/urandom from using the fd.
+#define kNaClZygoteDescriptor 3
+// For communications between the NaCl loader process and
+// the SUID sandbox.
+#define kNaClSandboxDescriptor 5
+// NOTE: kNaClBrowserDescriptor and kNaClSandboxDescriptor must match
+// content/browser/zygote_main_linux.cc kBrowserDescriptor and
+// kMagicSandboxIPCDescriptor.
+
+// A fork request from the Zygote to the helper includes an array
+// of three file descriptors. These constants are used as indicies
+// into the array.
+// Used to pass in the descriptor for talking to the Browser
+#define kNaClBrowserFDIndex 0
+// The next two are used in the protocol for discovering the
+// child processes real PID from within the SUID sandbox. See
+// http://code.google.com/p/chromium/wiki/LinuxZygote
+#define kNaClDummyFDIndex 1
+#define kNaClParentFDIndex 2
+
+#endif // CHROME_COMMON_NACL_HELPER_LINUX_H_
« no previous file with comments | « chrome/common/nacl_fork_delegate_linux.h ('k') | chrome/common/nacl_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698