Numerigraphe, it still seems to be the case.
Its somewhat confusing in job_next_state why so much trouble is taken to skip to JOB_STOPPING if there is no main process:
case JOB_RUNNING: switch (job->goal) { case JOB_STOP: if (job->class->process[PROCESS_MAIN] && (job->pid[PROCESS_MAIN] > 0)) { return JOB_PRE_STOP; } else { return JOB_STOPPING; } case JOB_START: return JOB_STOPPING; default: nih_assert_not_reached (); }
Seems it would be simpler to just go to pre-stop no matter what. I'm sure there's a good reason for this though.
Numerigraphe, it still seems to be the case.
Its somewhat confusing in job_next_state why so much trouble is taken to skip to JOB_STOPPING if there is no main process:
case JOB_RUNNING: >process[ PROCESS_ MAIN] PROCESS_ MAIN] > 0)) {
return JOB_PRE_STOP;
return JOB_STOPPING;
nih_ assert_ not_reached ();
switch (job->goal) {
case JOB_STOP:
if (job->class-
&& (job->pid[
} else {
}
case JOB_START:
return JOB_STOPPING;
default:
}
Seems it would be simpler to just go to pre-stop no matter what. I'm sure there's a good reason for this though.