summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-11 22:57:37 +0000
committermdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-11 22:57:37 +0000
commit13287f25a7562744b3570c2bc6ab9f329f35e239 (patch)
tree4c9fd3a6dcf486709bfc04d5fa1577d689f482f5
parent582d0859579409c7efc0dda9f611dbcf6886f2b7 (diff)
downloadchromium_src-13287f25a7562744b3570c2bc6ab9f329f35e239.zip
chromium_src-13287f25a7562744b3570c2bc6ab9f329f35e239.tar.gz
chromium_src-13287f25a7562744b3570c2bc6ab9f329f35e239.tar.bz2
Linux: call SetProcTitle() in GpuMain() to make the process name correct.
BUG=none TEST=none Review URL: http://codereview.chromium.org/3645003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62203 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/chrome_dll_main.cc3
-rw-r--r--chrome/gpu/gpu_main.cc8
2 files changed, 10 insertions, 1 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc
index 70dacf7..c08e109 100644
--- a/chrome/app/chrome_dll_main.cc
+++ b/chrome/app/chrome_dll_main.cc
@@ -825,6 +825,9 @@ int ChromeMain(int argc, char** argv) {
// AdjustLinuxOOMScore function too.
#if defined(OS_LINUX)
AdjustLinuxOOMScore(process_type);
+ // TODO(mdm): look into calling CommandLine::SetProcTitle() here instead of
+ // in each relevant main() function below, to fix /proc/self/exe showing up
+ // as our process name since we exec() via that to be update-safe.
#endif
// TODO(port): turn on these main() functions as they've been de-winified.
diff --git a/chrome/gpu/gpu_main.cc b/chrome/gpu/gpu_main.cc
index 5ffd39f..0c0d3c51 100644
--- a/chrome/gpu/gpu_main.cc
+++ b/chrome/gpu/gpu_main.cc
@@ -48,6 +48,13 @@ int GpuMain(const MainFunctionParams& parameters) {
InitCrashReporter();
#endif
+#if defined(OS_LINUX)
+ // On Linux we exec ourselves from /proc/self/exe, but that makes the
+ // process name that shows up in "ps" etc. for the GPU process show as
+ // "exe" instead of "chrome" or something reasonable. Try to fix it.
+ CommandLine::SetProcTitle();
+#endif
+
const CommandLine& command_line = parameters.command_line_;
if (command_line.HasSwitch(switches::kGpuStartupDialog)) {
ChildProcess::WaitForDebugger(L"Gpu");
@@ -73,4 +80,3 @@ int GpuMain(const MainFunctionParams& parameters) {
return 0;
}
-