There are multiple ways to obtain a process name in Linux: 1. /proc/PID/cmdline: The command line arguments that were passed (including argv[0] which is the process name) 2. /proc/PID/comm: The name of the command used, that can be initially equal to argv[0]. Method (1) is read by "ps -ef", and the way for a program to overwrite it is via questionable code like: https://github.com/karelzak/util-linux/blob/master/lib/setproctitle.c https://gitorious.org/libsetproctitle/libsetproctitle/source/50e52b1ca62aacc111832f1e0078b55110534c6e:setproctitle.c Method (2) is read by "ps -e" or top and the way for a program to overwrite it is via prctl(PR_SET_NAME). When overwriting the process name using prctl() or the setproctitle() above, only one of the /proc entries is updated leaving multiple names on a single process. That makes process name changing on a Linux system an interesting adventure. Some programs use the setproctitle() hack, while others the prctl() call, making process listing inconsistent. That is, some overwritten names show in ps -e for some programs, while for other programs they show in ps -ef. The procps maintainers believe that this isn't an issue of procps but rather of the kernel itself (see #1107682), and I tend to concur. I believe there should be a simple way for applications to overwrite their name.
Please take this to the upstream kernel developers.