Regression: rewritten program name gets truncated if it contains a ‘/’
Some programs rewrite their command line, adding slashes that can confuse htop. Older versions of htop, however, dealt with this gracefully. For example, here is an SSH server and its descendants, on Debian trixie, as shown by htop 3.3.0, with the option “Show program path” unchecked:
└─ sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
└─ sshd-session: debian [priv]
└─ sshd-session: debian@pts/0
└─ -bash
└─ tmux
In contrast, both htop 3.4.0 and the current main show:
└─ sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
└─ sshd-session: debian [priv]
└─ 0
└─ -bash
└─ tmux
Notice the process in the middle of the list, which was displayed as sshd-session: debian@pts/0 and is now displayed as 0. FWIW, the corresponding file /proc/$pid/cmdline contains "sshd-session: debian@pts/0\0\0\0\0\0\0\0\0\0\0".
The same issue affects a PHP process:
- htop 3.3.0:
php-fpm: master process (/etc/php/8.4/fpm/php-fpm.conf) - htop 3.4.0:
php-fpm.conf)
I git-bisected the issue to commit 1f664ee214b5d03f5e7ca674e949f878547ce4a0.
Thank you for reporting this regression. I'll take a look at it.