Merge lp:~jamesodhunt/upstart/quiesce-cleanup-fix into lp:upstart

Proposed by James Hunt on 2013-07-31
Status: Merged
Merged at revision: 1516
Proposed branch: lp:~jamesodhunt/upstart/quiesce-cleanup-fix
Merge into: lp:upstart
Diff against target: 52 lines (+12/-6)
3 files modified
ChangeLog (+6/-0)
init/main.c (+5/-0)
init/quiesce.c (+1/-6)
To merge this branch: bzr merge lp:~jamesodhunt/upstart/quiesce-cleanup-fix
Reviewer Review Type Date Requested Status
Dimitri John Ledkov 2013-07-31 Approve on 2013-07-31
Review via email: mp+177778@code.launchpad.net

Description of the change

* init/quiesce.c: quiesce_finalise(): Move cleanup to main()
  since the NIH main loop may be iterated once more before
  shutdown.

This may be a possible fix for bug 1205443 and bug 1202287.

To post a comment you must log in.
Dimitri John Ledkov (xnox) wrote :

lgtm =)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2013-07-25 19:44:38 +0000
3+++ ChangeLog 2013-07-31 09:32:42 +0000
4@@ -1,3 +1,9 @@
5+2013-07-31 James Hunt <james.hunt@ubuntu.com>
6+
7+ * init/quiesce.c: quiesce_finalise(): Move cleanup to main()
8+ since the NIH main loop may be iterated once more before
9+ shutdown.
10+
11 2013-07-25 James Hunt <james.hunt@ubuntu.com>
12
13 * extra/Makefile.am: Renamed to upstart-local-bridge.
14
15=== modified file 'init/main.c'
16--- init/main.c 2013-07-19 13:24:20 +0000
17+++ init/main.c 2013-07-31 09:32:42 +0000
18@@ -683,6 +683,11 @@
19 nih_main_loop_interrupt ();
20 ret = nih_main_loop ();
21
22+ /* Cleanup */
23+ conf_destroy ();
24+ session_destroy ();
25+ control_cleanup ();
26+
27 return ret;
28 }
29
30
31=== modified file 'init/quiesce.c'
32--- init/quiesce.c 2013-06-21 12:36:52 +0000
33+++ init/quiesce.c 2013-07-31 09:32:42 +0000
34@@ -232,17 +232,12 @@
35 /**
36 * quiesce_finalise:
37 *
38- * Perform final shutdown operations.
39+ * Request shutdown.
40 **/
41 void
42 quiesce_finalise (void)
43 {
44 nih_assert (quiesce_phase == QUIESCE_PHASE_CLEANUP);
45
46- /* Cleanup */
47- conf_destroy ();
48- session_destroy ();
49- control_cleanup ();
50-
51 nih_main_loop_exit (0);
52 }

Subscribers

People subscribed via source and target branches