OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ipc/ipc_channel_posix.h" | 5 #include "ipc/ipc_channel_posix.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "base/strings/string_util.h" | 44 #include "base/strings/string_util.h" |
45 #include "base/synchronization/lock.h" | 45 #include "base/synchronization/lock.h" |
46 #include "build/build_config.h" | 46 #include "build/build_config.h" |
47 #include "ipc/attachment_broker.h" | 47 #include "ipc/attachment_broker.h" |
48 #include "ipc/ipc_descriptors.h" | 48 #include "ipc/ipc_descriptors.h" |
49 #include "ipc/ipc_listener.h" | 49 #include "ipc/ipc_listener.h" |
50 #include "ipc/ipc_logging.h" | 50 #include "ipc/ipc_logging.h" |
51 #include "ipc/ipc_message_attachment_set.h" | 51 #include "ipc/ipc_message_attachment_set.h" |
52 #include "ipc/ipc_message_utils.h" | 52 #include "ipc/ipc_message_utils.h" |
53 #include "ipc/ipc_platform_file_attachment_posix.h" | 53 #include "ipc/ipc_platform_file_attachment_posix.h" |
54 #include "ipc/ipc_switches.h" | |
55 #include "ipc/unix_domain_socket_util.h" | 54 #include "ipc/unix_domain_socket_util.h" |
56 | 55 |
57 namespace IPC { | 56 namespace IPC { |
58 | 57 |
59 // IPC channels on Windows use named pipes (CreateNamedPipe()) with | 58 // IPC channels on Windows use named pipes (CreateNamedPipe()) with |
60 // channel ids as the pipe names. Channels on POSIX use sockets as | 59 // channel ids as the pipe names. Channels on POSIX use sockets as |
61 // pipes These don't quite line up. | 60 // pipes These don't quite line up. |
62 // | 61 // |
63 // When creating a child subprocess we use a socket pair and the parent side of | 62 // When creating a child subprocess we use a socket pair and the parent side of |
64 // the fork arranges it such that the initial control channel ends up on the | 63 // the fork arranges it such that the initial control channel ends up on the |
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1137 // static | 1136 // static |
1138 void Channel::SetGlobalPid(int pid) { | 1137 void Channel::SetGlobalPid(int pid) { |
1139 ChannelPosix::SetGlobalPid(pid); | 1138 ChannelPosix::SetGlobalPid(pid); |
1140 } | 1139 } |
1141 int Channel::GetGlobalPid() { | 1140 int Channel::GetGlobalPid() { |
1142 return ChannelPosix::GetGlobalPid(); | 1141 return ChannelPosix::GetGlobalPid(); |
1143 } | 1142 } |
1144 #endif // OS_LINUX | 1143 #endif // OS_LINUX |
1145 | 1144 |
1146 } // namespace IPC | 1145 } // namespace IPC |
OLD | NEW |