Merge lp:~gerboland/platform-api/hangup-on-mirconnection-lost into lp:platform-api

Proposed by Gerry Boland
Status: Merged
Approved by: Gerry Boland
Approved revision: 320
Merged at revision: 333
Proposed branch: lp:~gerboland/platform-api/hangup-on-mirconnection-lost
Merge into: lp:platform-api
Diff against target: 25 lines (+6/-2)
1 file modified
src/ubuntu/application/common/mirclient/ubuntu_application_api_mirclient.cpp (+6/-2)
To merge this branch: bzr merge lp:~gerboland/platform-api/hangup-on-mirconnection-lost
Reviewer Review Type Date Requested Status
Chris Halse Rogers Approve
Review via email: mp+305540@code.launchpad.net

Commit message

Raise SIGHUP on Mir connection loss

If the connection to the Mir server fails, signal hangup to the client. Otherwise it will have no idea and just keep spinning (example Qt clients)

To post a comment you must log in.
Revision history for this message
Chris Halse Rogers (raof) wrote :

Sure, that's acceptable.

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

I'll take that, thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/ubuntu/application/common/mirclient/ubuntu_application_api_mirclient.cpp'
--- src/ubuntu/application/common/mirclient/ubuntu_application_api_mirclient.cpp 2015-07-06 17:53:00 +0000
+++ src/ubuntu/application/common/mirclient/ubuntu_application_api_mirclient.cpp 2016-09-12 23:12:55 +0000
@@ -30,6 +30,8 @@
30#include <stdlib.h>30#include <stdlib.h>
31#include <assert.h>31#include <assert.h>
32#include <string.h>32#include <string.h>
33#include <signal.h>
34#include <unistd.h>
3335
34namespace uam = ubuntu::application::mir;36namespace uam = ubuntu::application::mir;
35namespace uamc = uam::client;37namespace uamc = uam::client;
@@ -56,8 +58,10 @@
56 delegate->resumed_cb(nullptr, c_ctx);58 delegate->resumed_cb(nullptr, c_ctx);
57 break;59 break;
58 }60 }
59 default:61 case mir_lifecycle_connection_lost:
60 break;62 {
63 kill(getpid(), SIGHUP);
64 }
61 }65 }
62}66}
63};67};

Subscribers

People subscribed via source and target branches