1
--- a/content/common/set_process_title.cc
2
+++ b/content/common/set_process_title.cc
3
@@ -69,6 +69,9 @@ void SetProcessTitleFromCommandLine(cons
4
// when the full command line is not being displayed in most process
6
prctl(PR_SET_NAME, base::FilePath(title).BaseName().value().c_str());
8
+ // Limits the exe path part in the title
9
+ title = base::FilePath(title).BaseName().value().c_str();
11
#endif // defined(OS_LINUX)
13
--- a/content/common/set_process_title_linux.cc
14
+++ b/content/common/set_process_title_linux.cc
21
extern char** environ;
23
@@ -88,7 +89,11 @@ void setproctitle(const char* fmt, ...)
24
// Put the title in argv[0]. We have to zero out the space first since the
25
// kernel doesn't actually look for a null terminator unless we make the
26
// argument list longer than it started.
27
- avail_size = page_end - (uintptr_t) g_main_argv[0];
29
+ for (i = 0; g_main_argv[i]; ++i) {
30
+ avail_size += strlen(g_main_argv[i]) + 1;
33
memset(g_main_argv[0], 0, avail_size);