~jamesodhunt/upstart/cgroups-and-process_data-reexec-test

« back to all changes in this revision

Viewing changes to init/job.c

  • Committer: James Hunt
  • Date: 2014-06-12 14:23:47 UTC
  • Revision ID: james.hunt@ubuntu.com-20140612142347-qi1an05eaww0arhx
* Formatting.

Show diffs side-by-side

added added

removed removed

Lines of Context:
483
483
                case JOB_PRE_STARTING:
484
484
                        nih_assert (job->goal == JOB_START);
485
485
                        nih_assert (old_state == JOB_SECURITY);
 
486
 
486
487
                        /* spawn pre-start asynchronously, child
487
488
                         * watcher asynchronously will change goal to
488
 
                         * stop if spawning fails */
 
489
                         * stop if spawning fails.
 
490
                         */
489
491
                        if (job->class->process[PROCESS_PRE_START]) {
490
492
                                job_process_start (job, PROCESS_PRE_START);
491
493
                        }       
513
515
                case JOB_SPAWNED:
514
516
                        nih_assert (job->goal == JOB_START);
515
517
                        nih_assert (old_state == JOB_SPAWNING);
 
518
 
516
519
                        if (! job->class->process[PROCESS_MAIN]) {
517
520
                                state = job_next_state (job);
518
521
                        }
 
522
 
519
523
                        break;
520
524
                case JOB_POST_STARTING:
521
525
                        nih_assert (job->goal == JOB_START);
591
595
                        break;
592
596
                case JOB_KILLED:
593
597
                        nih_assert (old_state == JOB_STOPPING);
 
598
 
594
599
                        if (job->class->process[PROCESS_MAIN]
595
600
                            && (job->pid[PROCESS_MAIN] > 0)) {
596
601
                                job_process_kill (job, PROCESS_MAIN);