Merge lp:~gerboland/unity-mir/shutdown-crash-fix3 into lp:unity-mir/devel-mir-next
Status: | Merged |
---|---|
Approved by: | Michał Sawicz |
Approved revision: | 223 |
Merged at revision: | 220 |
Proposed branch: | lp:~gerboland/unity-mir/shutdown-crash-fix3 |
Merge into: | lp:unity-mir/devel-mir-next |
Diff against target: |
62 lines (+22/-3) 1 file modified
src/unity-mir/qmirserver.cpp (+22/-3) |
To merge this branch: | bzr merge lp:~gerboland/unity-mir/shutdown-crash-fix3 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michał Sawicz | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email: mp+218394@code.launchpad.net |
Commit message
Fix crash on Mir-initiated shutdown, where stop() was being called on an already shutting-down server.
Mir initiates shutdown on SIGINT & SIGTERM, need to distinguish that shutdown from a client-initiated shutdown. Do this by installing a custom signal handler that is run after Mir's initiate-shutdown handler is called, so that we only call server.stop() on a client-initiated shutdown.
Description of the change
Fix crash on Mir-initiated shutdown, where stop() was being called on an already shutting-down server
To test, need to cover 2 use-cases:
1. Mir-initiated shutdown: run unity8 manually in shell, then hit Ctrl+C - should not crash
2. Qt-initiated shutdown: the first-run wizard, when it has completed, calls Qt.quit() on itself. This should cleanly shutdown the process.
FAILED: Continuous integration, rev:221 jenkins. qa.ubuntu. com/job/ unity-mir- devel-ci/ 1/ jenkins. qa.ubuntu. com/job/ unity-mir- devel-utopic- amd64-ci/ 1/console jenkins. qa.ubuntu. com/job/ unity-mir- devel-utopic- armhf-ci/ 1/console jenkins. qa.ubuntu. com/job/ unity-mir- devel-utopic- i386-ci/ 1/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/unity- mir-devel- ci/1/rebuild
http://