Comment #1 on issue 29118 by [email protected]: Chrome plugins show up as /proc/self/exe in top http://code.google.com/p/chromium/issues/detail?id=29118
On Linux/glibc there is no official setproctitle(), but we have one that works by mutating argv (which is the "approved" way to do it from the kernel's point of view) and has the same interface as the BSD version. It has lots of bounds checking and knows how to move environment variables out of the way to ensure that we only overwrite the right things. It should be used rather than overwriting argv[0] directly. The kernel has two places where it exposes information about process' names. One, the target of /proc/N/exe, is immutable. It contains the full path that was used to execute the binary and is only changed on exec*(). The other, /proc/N/cmdline, is a pointer into the process' argv array and can be changed by setproctitle(). Some process viewing tools only look at the exe symlink; for these tools, there is nothing we can do to change what they will display. Other tools will look at cmdline, or have an option to do so - for example the c key toggles between these modes in top. Previously I had thought that all the current GUI tools would only look at the exe link, although recently I discovered that at least the GNOME process viewer can be set to look at the cmdline instead (although it's not an obvious setting). -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings -- Automated mail from issue updates at http://crbug.com/ Subscription options: http://groups.google.com/group/chromium-bugs
