Merge lp:~mzanetti/unity-mir/quit-manually-started-procs into lp:unity-mir

Proposed by Michael Zanetti
Status: Merged
Approved by: Gerry Boland
Approved revision: 195
Merged at revision: 210
Proposed branch: lp:~mzanetti/unity-mir/quit-manually-started-procs
Merge into: lp:unity-mir
Diff against target: 26 lines (+9/-0)
1 file modified
src/modules/Unity/Application/application_manager.cpp (+9/-0)
To merge this branch: bzr merge lp:~mzanetti/unity-mir/quit-manually-started-procs
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+214013@code.launchpad.net

Commit message

send a SIGTERM to the process if upstart fails to stop an application

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.

no

 * Did you perform an exploratory manual test run of your code change and any related functionality?

yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

no

 * If you changed the UI, has there been a design review?

no

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

Why is the bug marked invalid?

Please add the MR checklist.

Fix looks good & tests fine.

review: Needs Fixing
Revision history for this message
Michael Zanetti (mzanetti) wrote :

> Why is the bug marked invalid?

Seems only invalid for the settings app.

>
> Please add the MR checklist.

done

Revision history for this message
Gerry Boland (gerboland) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/modules/Unity/Application/application_manager.cpp'
2--- src/modules/Unity/Application/application_manager.cpp 2014-04-01 22:49:46 +0000
3+++ src/modules/Unity/Application/application_manager.cpp 2014-04-03 12:55:31 +0000
4@@ -45,6 +45,9 @@
5 // Qt
6 #include <QCoreApplication>
7
8+// std
9+#include <csignal>
10+
11 // Default element sizes
12 #define SIDE_STAGE_WIDTH_GU 40
13 #define TABLET_MODE_MINIMUM_WIDTH_GU 100
14@@ -505,6 +508,12 @@
15 bool result = m_taskController->stop(application->appId());
16
17 LOG_IF(result == false, "FAILED to ask Upstart to stop application '%s'", qPrintable(application->appId()));
18+
19+ if (!result && application->pid() > 0) {
20+ DLOG("TaskController::stop UAL failed. Sending SIGTERM to %i", application->pid());
21+ kill(application->pid(), SIGTERM);
22+ }
23+
24 delete application;
25
26 // FIXME(dandrader): lying here. The operation is async. So we will only know whether

Subscribers

People subscribed via source and target branches