| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_COMMON_NACL_HELPER_LINUX_H_ | |
| 6 #define CHROME_COMMON_NACL_HELPER_LINUX_H_ | |
| 7 | |
| 8 // A mini-zygote specifically for Native Client. This file defines | |
| 9 // constants used to implement communication between the nacl_helper | |
| 10 // process and the Chrome zygote. | |
| 11 | |
| 12 // Used by Helper to tell Zygote it has started successfully. | |
| 13 #define kNaClHelperStartupAck "NACLHELPER_OK" | |
| 14 // Used by Zygote to ask Helper to fork a new NaCl loader. | |
| 15 #define kNaClForkRequest "NACLFORK" | |
| 16 | |
| 17 // The next set of constants define global Linux file descriptors. | |
| 18 // For communications between NaCl loader and browser. | |
| 19 // See also content/common/zygote_main_linux.cc and | |
| 20 // http://code.google.com/p/chromium/wiki/LinuxZygote | |
| 21 | |
| 22 // For communications between NaCl loader and zygote. | |
| 23 #define kNaClZygoteDescriptor 3 | |
| 24 // For communications between the NaCl loader process and | |
| 25 // the SUID sandbox. | |
| 26 #define kNaClSandboxDescriptor 5 | |
| 27 // NOTE: kNaClSandboxDescriptor must match | |
| 28 // content/browser/zygote_main_linux.cc | |
| 29 // kMagicSandboxIPCDescriptor. | |
| 30 | |
| 31 // A fork request from the Zygote to the helper includes an array | |
| 32 // of three file descriptors. These constants are used as indicies | |
| 33 // into the array. | |
| 34 // Used to pass in the descriptor for talking to the Browser | |
| 35 #define kNaClBrowserFDIndex 0 | |
| 36 // The next two are used in the protocol for discovering the | |
| 37 // child processes real PID from within the SUID sandbox. See | |
| 38 // http://code.google.com/p/chromium/wiki/LinuxZygote | |
| 39 #define kNaClDummyFDIndex 1 | |
| 40 #define kNaClParentFDIndex 2 | |
| 41 | |
| 42 #endif // CHROME_COMMON_NACL_HELPER_LINUX_H_ | |
| OLD | NEW |