summaryrefslogtreecommitdiffstats
path: root/chrome/common/service_process_util_linux.cc
diff options
context:
space:
mode:
authorabeera@google.com <abeera@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-24 18:57:24 +0000
committerabeera@google.com <abeera@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-24 18:57:24 +0000
commit84818e9ec2de7346183fd46d8ff56b57d2902bda (patch)
tree0f3c09e97d4b75351cb4a0d543a11f9438e48484 /chrome/common/service_process_util_linux.cc
parent5442ecb6ca42b4873a4f089f9a18e81d7ab3dcd1 (diff)
downloadchromium_src-84818e9ec2de7346183fd46d8ff56b57d2902bda.zip
chromium_src-84818e9ec2de7346183fd46d8ff56b57d2902bda.tar.gz
chromium_src-84818e9ec2de7346183fd46d8ff56b57d2902bda.tar.bz2
Fix to bug 75303
Makes the sun_path an absolute path("/tmp/pipe_name") to allow IPC between processes with different working directories BUG=75303 TEST=NONE Review URL: http://codereview.chromium.org/7167017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90400 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/service_process_util_linux.cc')
-rw-r--r--chrome/common/service_process_util_linux.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/chrome/common/service_process_util_linux.cc b/chrome/common/service_process_util_linux.cc
index d51654b..fe3d04f 100644
--- a/chrome/common/service_process_util_linux.cc
+++ b/chrome/common/service_process_util_linux.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -7,9 +7,11 @@
#include <signal.h>
#include <unistd.h>
+#include "base/base_paths.h"
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/logging.h"
+#include "base/path_service.h"
#include "base/threading/platform_thread.h"
#include "chrome/common/auto_start_linux.h"
#include "chrome/common/multi_process_lock.h"
@@ -67,6 +69,18 @@ bool ForceServiceProcessShutdown(const std::string& version,
return true;
}
+// Gets the name of the service process IPC channel.
+// Returns an absolute path as required.
+IPC::ChannelHandle GetServiceProcessChannel() {
+ FilePath temp_dir;
+ PathService::Get(base::DIR_TEMP, &temp_dir);
+ std::string pipe_name = GetServiceProcessScopedVersionedName("_service_ipc");
+ std::string pipe_path = temp_dir.Append(pipe_name).value();
+ return pipe_path;
+}
+
+
+
bool CheckServiceProcessReady() {
scoped_ptr<MultiProcessLock> running_lock(TakeServiceRunningLock(false));
return running_lock.get() == NULL;