Merge lp://qastaging/~gerboland/unity-mir/shutdown-crash-fix3 into lp://qastaging/unity-mir/devel-mir-next

Proposed by Gerry Boland
Status: Merged
Approved by: Michał Sawicz
Approved revision: 223
Merged at revision: 220
Proposed branch: lp://qastaging/~gerboland/unity-mir/shutdown-crash-fix3
Merge into: lp://qastaging/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://qastaging/~gerboland/unity-mir/shutdown-crash-fix3
Reviewer Review Type Date Requested Status
Michał Sawicz Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+218394@code.qastaging.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.

To post a comment you must log in.
221. By Gerry Boland

bump

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
222. By Gerry Boland

Missing csignal header

223. By Gerry Boland

Add Mir main_loop.h header

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

Yeah, tested both unity8 and the wizard and things are better.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches