Merge lp:~xnox/upstart/async-asserts into lp:upstart

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 1625
Proposed branch: lp:~xnox/upstart/async-asserts
Merge into: lp:upstart
Diff against target: 38 lines (+11/-3)
2 files modified
init/job.c (+8/-1)
init/job_process.c (+3/-2)
To merge this branch: bzr merge lp:~xnox/upstart/async-asserts
Reviewer Review Type Date Requested Status
James Hunt Approve
Review via email: mp+222026@code.launchpad.net
To post a comment you must log in.
Revision history for this message
James Hunt (jamesodhunt) wrote :

LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'init/job.c'
--- init/job.c 2014-06-04 10:38:06 +0000
+++ init/job.c 2014-06-04 11:56:15 +0000
@@ -380,11 +380,18 @@
380{380{
381 nih_assert (job != NULL);381 nih_assert (job != NULL);
382382
383 /* We may not be blocked by any events when doing first
384 * transition */
385 nih_assert (job->blocker == NULL);
386
383 while (job->state != state) {387 while (job->state != state) {
384 JobState old_state;388 JobState old_state;
385 int unused;389 int unused;
386390
387 nih_assert (job->blocker == NULL);391 /* If we got blocked during async spawns, stop
392 * transitions */
393 if (job->blocker)
394 return;
388395
389 nih_info (_("%s state changed from %s to %s"), job_name (job),396 nih_info (_("%s state changed from %s to %s"), job_name (job),
390 job_state_name (job->state), job_state_name (state));397 job_state_name (job->state), job_state_name (state));
391398
=== modified file 'init/job_process.c'
--- init/job_process.c 2014-05-21 22:03:40 +0000
+++ init/job_process.c 2014-06-04 11:56:15 +0000
@@ -2476,8 +2476,9 @@
24762476
2477 if (job && job->state == JOB_SPAWNED) {2477 if (job && job->state == JOB_SPAWNED) {
2478 if (job->class->expect == EXPECT_NONE) {2478 if (job->class->expect == EXPECT_NONE) {
2479 nih_assert (process == PROCESS_MAIN);2479 if (process == PROCESS_MAIN) {
2480 job_change_state (job, job_next_state (job));2480 job_change_state (job, job_next_state (job));
2481 }
2481 }2482 }
2482 }2483 }
2483 2484

Subscribers

People subscribed via source and target branches