~albaguirre/unity-mir/add-power-key-listener

Viewing all changes in revision 220.

  • Committer: Tarmac
  • Author(s): Gerry Boland
  • Date: 2014-05-06 20:14:08 UTC
  • mfrom: (219.1.4 shutdown-crash-fix3)
  • Revision ID: tarmac-20140506201408-0ebtdu9ivamg5ffv
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. Fixes: https://bugs.launchpad.net/bugs/1315251.

Approved by Michał Sawicz, PS Jenkins bot.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: