Summary: | Process name change isn’t reflected in tabbar after using exec | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | ariasuni <aria> |
Component: | tabbar | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 20.12.3 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/utilities/konsole/-/commit/25f8ebf9b67be936a60e2d45f69391378ce56788 | Version Fixed In: |
Description
ariasuni
2018-02-26 21:48:30 UTC
Following your steps, it works here on master and the 17.12 branch. You are using the default format %d : %n ? OK if you bash as the profile's command, it doesn't work. It does work if you start from a zsh shell. Here is a demonstration: > bash # Command [bash] # Process reported by Konsole (%n) >exec zsh [bash] > htop [htop] # I quit htop [bash] # Konsole seems to keep process name in memory > zsh [zsh] > exec fish [zsh] > fish [fish] Sorry for the formatting (I should have used preview!), here is a more readable version: $ bash [bash] # Process reported by Konsole (%n) $ exec zsh [bash] $ htop [htop] // I quit htop [bash] (Konsole seems to keep process name in memory) $ zsh [zsh] $ exec fish [zsh] $ fish [fish] I still have this problem in Konsole 18.08.0, KDE Frameworks 5.49.0. A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/864 Git commit 25f8ebf9b67be936a60e2d45f69391378ce56788 by Kurt Hindenburg, on behalf of Theodore Wang. Committed on 10/09/2023 at 15:14. Pushed by hindenburg into branch 'master'. Periodically check and update ProcessInfo::_name Currently, there is an issue where 'exec [program]' results in tab titles not being updated and not showing the process name as [program]. This is probably due to how 'exec' does not result in any change in pid and simply replaces the current process image with a different one. Due to a lack of pid changes, Session::updateSessionProcessInfo will not call ProcessInfo::newInstance, thus not updating the ProcessInfo::_name. This new change periodically checks and updates the _name of ProcessInfo through ProcessInfo::readProcessName, which is called by ProcessInfo::update. M +5 -0 src/NullProcessInfo.cpp M +1 -0 src/NullProcessInfo.h M +149 -67 src/ProcessInfo.cpp M +7 -0 src/ProcessInfo.h M +27 -0 src/UnixProcessInfo.cpp M +17 -0 src/UnixProcessInfo.h https://invent.kde.org/utilities/konsole/-/commit/25f8ebf9b67be936a60e2d45f69391378ce56788 |