summaryrefslogtreecommitdiffstats
path: root/chrome/plugin/plugin_main.cc
diff options
context:
space:
mode:
authormdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-03 02:20:08 +0000
committermdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-03 02:20:08 +0000
commitf07bd1ecc85ac808de4efec5ba8a0f7372cfa694 (patch)
tree3b3a0a6f55f53fdcc731810c274fba78578acdb2 /chrome/plugin/plugin_main.cc
parenta88f9709ca82ecf4a2d6a95972d18b921b98c6af (diff)
downloadchromium_src-f07bd1ecc85ac808de4efec5ba8a0f7372cfa694.zip
chromium_src-f07bd1ecc85ac808de4efec5ba8a0f7372cfa694.tar.gz
chromium_src-f07bd1ecc85ac808de4efec5ba8a0f7372cfa694.tar.bz2
Linux: use readlink() and prctl() in SetProcTitle() to fix "exe" showing in process listings.
BUG=29118 TEST=none Review URL: http://codereview.chromium.org/490028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35441 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin/plugin_main.cc')
-rw-r--r--chrome/plugin/plugin_main.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/plugin/plugin_main.cc b/chrome/plugin/plugin_main.cc
index 319ccce..1cbcc57 100644
--- a/chrome/plugin/plugin_main.cc
+++ b/chrome/plugin/plugin_main.cc
@@ -62,7 +62,12 @@ int PluginMain(const MainFunctionParams& parameters) {
const CommandLine& parsed_command_line = parameters.command_line_;
-#if defined(OS_WIN)
+#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 plugins show as "exe"
+ // instead of "chrome" or something reasonable. Try to fix it.
+ CommandLine::SetProcTitle();
+#elif defined(OS_WIN)
sandbox::TargetServices* target_services =
parameters.sandbox_info_.TargetServices();