aboutsummaryrefslogtreecommitdiff
path: root/src/progman.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/progman.c')
-rw-r--r--src/progman.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/progman.c b/src/progman.c
index 5bc4eb3..a625885 100644
--- a/src/progman.c
+++ b/src/progman.c
@@ -324,7 +324,8 @@ progman_startup_phase (void)
for (prog = proghead; prog; prog = prog->next)
{
- if (IS_COMPONENT (prog) && prog->v.p.comp->mode == pies_comp_startup)
+ if (IS_COMPONENT (prog) && prog->v.p.comp->mode == pies_comp_startup
+ && prog->v.p.status == status_running)
return 1;
}
return 0;
@@ -338,7 +339,7 @@ progman_waiting_p (void)
for (prog = proghead; prog; prog = prog->next)
{
if (IS_COMPONENT (prog)
- && prog->pid > 0
+ && prog->v.p.status == status_running
&& (prog->wait || prog->v.p.comp->mode == pies_comp_startup))
{
debug (3, ("%s: waiting for %s (%lu)",
@@ -2356,14 +2357,6 @@ progman_cleanup (int expect_term)
}
destroy_prog (&prog);
}
- else if (prog->v.p.comp->mode == pies_comp_startup)
- {
- debug (1, (_("removing startup component %s, pid=%lu"),
- prog_tag (prog), (unsigned long)pid));
- destroy_prog (&prog);
- if (!progman_startup_phase ())
- pies_schedule_children (PIES_CHLD_WAKEUP);
- }
else
{
if (prog->v.p.comp->mode >= pies_mark_sysvinit
@@ -2379,6 +2372,12 @@ progman_cleanup (int expect_term)
prog->wait = 0;
}
}
+ else if (prog->v.p.comp->mode == pies_comp_startup)
+ {
+ prog->v.p.status = status_finished;
+ if (!progman_startup_phase ())
+ pies_schedule_children (PIES_CHLD_WAKEUP);
+ }
else
{
if (is_sysvinit (prog->v.p.comp))

Return to:

Send suggestions and report system problems to the System administrator.