Bug 368596

Summary: foreground process infos are not updated when getting them
Product: [Applications] konsole Reporter: Pascal VITOUX <vitoux.pascal>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED DUPLICATE    
Severity: normal CC: bugzilla-kde, kde, laurent.rineau, luigi.toscano, martin.sandsmark, rdieter
Priority: NOR    
Version: master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=367746
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Pascal VITOUX 2016-09-11 14:21:22 UTC
Foreground process informations , used for tab title or some dbus queries , are not updated when the process is replaced by another one. 

This bug was introduced by commit " 79ca76a94 - Fix checking of foreground process "
In Session::getProcessInfo() :  _foregroundProcessInfo is updated only the first time (when null).
The only other time it gets updated is by calling Session::foregroundProcessName() .




Reproducible: Always

Steps to Reproduce:
1. Open a tab in Konsole and use the default tab title format ( %d : %n ) 
2. Run command "sleep 2"
3. Run command "cat"

Actual Results:  
When running the second command, the tab title is updated with the process name of the first command ("sleep") .

Expected Results:  
When running the second command, the tab title should be updated with the name of the process currently running ("cat") .
Comment 1 Pascal VITOUX 2016-09-19 19:24:11 UTC
fixed in the master branch : https://quickgit.kde.org/?p=konsole.git&a=commit&h=3747ecfde0800804717203d7f5fa0f96c0791052

*** This bug has been marked as a duplicate of bug 368785 ***