| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2006-2009 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 BASE_RESERVED_FILE_DESCRIPTORS_H_ |
| 6 #define BASE_RESERVED_FILE_DESCRIPTORS_H_ |
| 7 |
| 8 #if defined(OS_POSIX) |
| 9 |
| 10 // Chrome uses predefined file descriptors to communicate with child processes. |
| 11 // Normally this is a private contract between code that does fork/exec and the |
| 12 // code it invokes, but in zygote mode, things get a little more interesting. |
| 13 // It's a huge layering violation for this to be in base, but |
| 14 // logging and ZygoteManager need kReservedFileDescriptors, so there. |
| 15 |
| 16 enum GlobalReservedFds { |
| 17 // Classic unix file descriptors. |
| 18 // Let's leave them alone even if we don't use them. |
| 19 kStdinFd = 0, |
| 20 kStdoutFd = 1, |
| 21 kStderrFd = 2, |
| 22 |
| 23 // See chrome/common/ipc_channel_posix.cc |
| 24 kClientChannelFd = 3, |
| 25 |
| 26 // See chrome/app/breakpad_linux.cc and |
| 27 // chrome/browser/renderer_host/browser_render_process_host.cc |
| 28 kMagicCrashSignalFd = 4, |
| 29 |
| 30 // One plus highest fd mentioned in this enum. |
| 31 kReservedFds = 5 |
| 32 }; |
| 33 |
| 34 #endif |
| 35 |
| 36 #endif |
| OLD | NEW |