Mir

Merge lp:~alan-griffiths/mir/fix-1237710 into lp:mir

Proposed by Alan Griffiths
Status: Merged
Approved by: Daniel van Vugt
Approved revision: no longer in the source branch.
Merged at revision: 1144
Proposed branch: lp:~alan-griffiths/mir/fix-1237710
Merge into: lp:mir
Diff against target: 11 lines (+3/-0)
1 file modified
src/server/run_mir.cpp (+3/-0)
To merge this branch: bzr merge lp:~alan-griffiths/mir/fix-1237710
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
Robert Carr (community) Abstain
PS Jenkins bot (community) continuous-integration Approve
Alexandros Frantzis (community) Abstain
Kevin DuBois (community) Approve
Review via email: mp+191412@code.launchpad.net

Commit message

Fix failing acceptance-test:
ServerShutdown/OnSignal.removes_endpoint_on_signal (LP: #1237710)

Avoid fatal_signal_cleanup getting caught in a loop restoring itself and
then re-entering itself. This could happen in some permutations of
acceptance-tests where run_mir is entered with fatal_signal_cleanup already
set up from previous tests' server instances.

Description of the change

run_mir: restore signals handlers after the server exits.

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Of course, this doesn't restore the handlers if an exception propagates out of server.run(). There's a longer version that handles this:

https://code.launchpad.net/~alan-griffiths/mir/raii-fix-1237710/+merge/191420

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Kevin DuBois (kdub) :
review: Approve
Revision history for this message
Alexandros Frantzis (afrantzis) :
review: Abstain
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Robert Carr (robertcarr) :
review: Abstain
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It works too.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/server/run_mir.cpp'
2--- src/server/run_mir.cpp 2013-10-14 06:33:42 +0000
3+++ src/server/run_mir.cpp 2013-10-16 13:38:10 +0000
4@@ -78,4 +78,7 @@
5
6 init(server);
7 server.run();
8+
9+ for (auto sig : { SIGQUIT, SIGABRT, SIGFPE, SIGSEGV, SIGBUS })
10+ signal(sig, old_handler[sig]);
11 }

Subscribers

People subscribed via source and target branches