Created attachment 159160 [details] observed result of a incorrectly parsed executable Run the following in a terminal window 1. cp $(which sleep) brokentab\(title 2. ./brokentab\(title 10000 OBSERVED RESULT the tab title appears to incorrectly parse "(" and uses the rest of entire result of /proc/$PID/stat after the one in the executable name see attachment 1 [details] EXPECTED RESULT tab title should show just the executable name: brokentab(title I expect the problem to occur here: https://invent.kde.org/utilities/konsole/-/blob/807382fabf79e2c63eb6215b64a711ffdf928cad/src/ProcessInfo.cpp#L425
A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/872
Git commit 48523348d9e1c1b2c559314c84372ebe41312638 by Kurt Hindenburg, on behalf of Theodore Wang. Committed on 12/08/2023 at 09:04. Pushed by hindenburg into branch 'master'. Resolve parsing issues for certain process names to fix incorrect tab titles Valid file names for executables can contain '(', ')' or ' '. Some odd but legal executable names include "a) (b", "(a" and "b)". The above examples will lead to incorrect tab titles due to incorrect parsing of the tab names. This change finds the index of the last character of the name field by searching for the last occurence of ')'. The search encompasses a range of 16 characters starting from the starting index of the name field. This change relies on the field in /proc/%pid/stat containing the name of the process to start with '(' and ends with ')'. It also relies on the fact that the maximum length of the name of a process is 16 characters. Lastly, it relies on the rest of the contents of /proc/%pid/stat not containing parentheses. M +8 -8 src/ProcessInfo.cpp https://invent.kde.org/utilities/konsole/-/commit/48523348d9e1c1b2c559314c84372ebe41312638