diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-19 02:24:43 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-19 02:24:43 +0000 |
commit | 4d6995212927d8496fb61fe4efb58f5485499fa7 (patch) | |
tree | 1ada96809bc50cb6334f261c29a0698f1b38b471 /chrome | |
parent | 40a62225b11646669b843ebcb62957abe2499fd6 (diff) | |
download | chromium_src-4d6995212927d8496fb61fe4efb58f5485499fa7.zip chromium_src-4d6995212927d8496fb61fe4efb58f5485499fa7.tar.gz chromium_src-4d6995212927d8496fb61fe4efb58f5485499fa7.tar.bz2 |
Revert "linux: use /proc/self/exe when exec'ing ourselves"
This reverts commit r32457.
This works for me in Debug and Release, and Lei in Debug, but not
for him or the bots in Release. Hate computers.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32472 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/common/child_process_host.cc | 16 | ||||
-rw-r--r-- | chrome/common/chrome_constants.cc | 4 | ||||
-rw-r--r-- | chrome/test/chrome_process_util.cc | 7 |
3 files changed, 10 insertions, 17 deletions
diff --git a/chrome/common/child_process_host.cc b/chrome/common/child_process_host.cc index 2e0f1f6..d4a9eda 100644 --- a/chrome/common/child_process_host.cc +++ b/chrome/common/child_process_host.cc @@ -93,20 +93,16 @@ FilePath ChildProcessHost::GetChildPath() { if (!child_path.empty()) return child_path; -#if defined(OS_LINUX) - // Use /proc/self/exe rather than our known binary path so updates - // can't swap out the binary from underneath us. - child_path = FilePath("/proc/self/exe"); -#elif defined(OS_MACOSX) +#if !defined(OS_MACOSX) + // On most platforms, the child executable is the same as the current + // executable. + PathService::Get(base::FILE_EXE, &child_path); +#else // On the Mac, the child executable lives at a predefined location within // the app bundle's versioned directory. child_path = chrome::GetVersionedDirectory(). Append(chrome::kHelperProcessExecutablePath); -#else - // On most platforms, the child executable is the same as the current - // executable. - PathService::Get(base::FILE_EXE, &child_path); -#endif +#endif // OS_MACOSX return child_path; } diff --git a/chrome/common/chrome_constants.cc b/chrome/common/chrome_constants.cc index 81d03ea..1226fe5 100644 --- a/chrome/common/chrome_constants.cc +++ b/chrome/common/chrome_constants.cc @@ -29,9 +29,7 @@ const wchar_t kBrowserProcessExecutableName[] = L"chrome.exe"; const wchar_t kHelperProcessExecutableName[] = L"chrome.exe"; #elif defined(OS_LINUX) const wchar_t kBrowserProcessExecutableName[] = L"chrome"; -// Helper processes end up with a name of "exe" due to execing via -// /proc/self/exe. See bug 22703. -const wchar_t kHelperProcessExecutableName[] = L"exe"; +const wchar_t kHelperProcessExecutableName[] = L"chrome"; #elif defined(OS_MACOSX) const wchar_t kBrowserProcessExecutableName[] = PRODUCT_STRING_W; const wchar_t kHelperProcessExecutableName[] = PRODUCT_STRING_W L" Helper"; diff --git a/chrome/test/chrome_process_util.cc b/chrome/test/chrome_process_util.cc index fea1d0e..f53cbbd 100644 --- a/chrome/test/chrome_process_util.cc +++ b/chrome/test/chrome_process_util.cc @@ -100,10 +100,9 @@ ChromeProcessList GetRunningChromeProcesses(const FilePath& data_dir) { } #endif // defined(OS_LINUX) -#if defined(OS_LINUX) || defined(OS_MACOSX) - // On Mac OS X we run the subprocesses with a different bundle, and - // on Linux via /proc/self/exe, so they end up with a different - // name. We must collect them in a second pass. +#if defined(OS_MACOSX) + // On Mac OS X we run the subprocesses with a different bundle, so they end + // up with a different name, so we have to collect them in a second pass. { ChildProcessFilter filter(browser_pid); base::NamedProcessIterator it(chrome::kHelperProcessExecutableName, |