Chromium Code Reviews| Index: components/arc/arc_bridge_bootstrap.cc |
| diff --git a/components/arc/arc_bridge_bootstrap.cc b/components/arc/arc_bridge_bootstrap.cc |
| index 1d7a94f55178b590325f95b1ce23fff6f1c2afb5..b503633d092b8f027df04eef9199bb3658e22df1 100644 |
| --- a/components/arc/arc_bridge_bootstrap.cc |
| +++ b/components/arc/arc_bridge_bootstrap.cc |
| @@ -34,16 +34,6 @@ namespace arc { |
| namespace { |
| -// We do not know the PID of ARC, since Chrome does not create it directly. |
| -// Since Mojo in POSIX does not use the child PID except as an unique |
| -// identifier for the routing table, rather than doing a lot of plumbing in the |
| -// whole system to get the correct PID, just use an arbitrary number that will |
| -// never be used by a legitimate process. Chrome OS assigns unassigned PIDs |
| -// sequentially until it reaches a certain maximum value (Chrome OS uses the |
| -// default value of 32k), at which point it loops around to zero. An arbitrary |
| -// number larger than the maximum should be safe. |
| -const pid_t kArcPid = 0x3DE0EA7C; |
| - |
| const base::FilePath::CharType kArcBridgeSocketPath[] = |
| FILE_PATH_LITERAL("/var/run/chrome/arc_bridge.sock"); |
| @@ -260,8 +250,9 @@ base::ScopedFD ArcBridgeBootstrapImpl::AcceptInstanceConnection( |
| } |
| base::ScopedFD scoped_fd(raw_fd); |
| + // Hardcode pid 0 since it is unused in mojo. |
| mojo::edk::ScopedPlatformHandle child_handle = |
| - mojo::edk::ChildProcessLaunched(kArcPid); |
| + mojo::edk::ChildProcessLaunched(0); |
|
Luis Héctor Chávez
2016/04/06 15:23:13
Same here.
kcwu
2016/04/07 01:02:27
Done.
|
| mojo::edk::ScopedPlatformHandleVectorPtr handles( |
| new mojo::edk::PlatformHandleVector{child_handle.release()}); |