summaryrefslogtreecommitdiffstats
path: root/chrome/test/chrome_process_util.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-19 01:02:06 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-19 01:02:06 +0000
commit29df9669a9118725d704370b1645b1097ffd8c46 (patch)
tree68bac755ddc1996c7f78b5c324cc9957c0f0c981 /chrome/test/chrome_process_util.cc
parentb155760901d8844b9d40bfe43617597a684924db (diff)
downloadchromium_src-29df9669a9118725d704370b1645b1097ffd8c46.zip
chromium_src-29df9669a9118725d704370b1645b1097ffd8c46.tar.gz
chromium_src-29df9669a9118725d704370b1645b1097ffd8c46.tar.bz2
linux: use /proc/self/exe when exec'ing ourselves
We don't want to ever go out to disk when looking for data after startup, since they can be changed by an update. We *should* just be using the zygote, but the zygote is sandboxed-only for now, and fixing that has a lengthy dependency graph. In the interim, /proc/self/exe is the correct executable and exec'ing it should work as long as the subprocess doesn't need any other files from the Chrome directory. BUG=22703 TEST=Start Chrome. Move away the entire Chrome directory; plugins should still work. Review URL: http://codereview.chromium.org/403018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32457 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/chrome_process_util.cc')
-rw-r--r--chrome/test/chrome_process_util.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/test/chrome_process_util.cc b/chrome/test/chrome_process_util.cc
index f53cbbd..fea1d0e 100644
--- a/chrome/test/chrome_process_util.cc
+++ b/chrome/test/chrome_process_util.cc
@@ -100,9 +100,10 @@ ChromeProcessList GetRunningChromeProcesses(const FilePath& data_dir) {
}
#endif // defined(OS_LINUX)
-#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.
+#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.
{
ChildProcessFilter filter(browser_pid);
base::NamedProcessIterator it(chrome::kHelperProcessExecutableName,