Bug 313823 - DrKonqi should support correctly restarting PyKDE applications (like kajongg)
Summary: DrKonqi should support correctly restarting PyKDE applications (like kajongg)
Status: RESOLVED FIXED
Alias: None
Product: drkonqi
Classification: Unclassified
Component: general (show other bugs)
Version: 2.1.5
Platform: Other Linux
: NOR wishlist (vote)
Target Milestone: ---
Assignee: Jekyll Wu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-24 12:17 UTC by Jekyll Wu
Modified: 2013-09-09 10:44 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jekyll Wu 2013-01-24 12:17:23 UTC
PyKDE applications (like kajong)

If kajongg crashes, pressing the "Restart Application" will not successfully restart kajongg. 

The cause is drkonqi curretly relies upon /proc/<pid>/exe to determine the binary path. However, for PyKDE applicaitons, that /proc/<pid>/exe points to the python interpreter. So DrKonqi actually tries to restart python in that kajongg case.

To solve the problem, DrKonqi could turn to /proc/<pid>/cmdline when it notices the binary path is python. Or, maybe Drkonqi should just prefer /proc/<pid>/cmdline, since that file usually contains all the exact arguments, which means it is possible for DrKonqi to restart application in the exact same arguements. One potential problem with /proc/<pid>/cmdline is some applications might modify their cmdline arguments (like kdeinit4), which makes /proc/<pid>/cmdline unusable for the restarting purpose.

Of course, the above usage of /proc is Linux centric. 


Reproducible: Always

Steps to Reproduce:
1. start kajongg
2. kill -6 pid-of-kajongg
3. push the "Restart Application' button in DrKonqi
Actual Results:  
kajongg not restarted

Expected Results:  
kajongg restarted
Comment 1 Jekyll Wu 2013-01-24 12:58:49 UTC
Assign it to myself since I plan to work on this :)
Comment 2 Jekyll Wu 2013-09-09 10:44:28 UTC
Git commit beb129b6c1b8f2c4cd77f3d660acd76ef237a1d6 by Jekyll Wu.
Committed on 08/09/2013 at 16:57.
Pushed by jekyllwu into branch 'KDE/4.11'.

Improve the support of pykde applications in Dr.Konqi

   * "Restart Application" button now also works for pykde apps
   * pykde apps are reported according to their real name instead of "python"

The implementation is dirty, but it works and I don't have much time and
don't want to read crash reports of "python" any more.
FIXED-IN: 4.11.2

M  +3    -1    drkonqi/drkonqibackends.cpp

http://commits.kde.org/kde-runtime/beb129b6c1b8f2c4cd77f3d660acd76ef237a1d6