summaryrefslogtreecommitdiffabout
path: root/src/comp.c
Side-by-side diff
Diffstat (limited to 'src/comp.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/comp.c32
1 files changed, 6 insertions, 26 deletions
diff --git a/src/comp.c b/src/comp.c
index 6a0e4ba..b340abe 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -360,8 +360,8 @@ prog_is_leftover (struct prog *prog)
-/* If PROG is a leftover, gracefully stop it and mark as disabled */
+/* If PROG is a leftover, mark it for termination */
static int
-cb_terminate_prog (struct prog *prog, void *data)
+mark_prog (struct prog *prog, void *data)
{
if (prog_is_leftover (prog))
- progman_stop_component (&prog);
+ prog->v.p.stop = 1;
return 0;
@@ -369,18 +369,2 @@ cb_terminate_prog (struct prog *prog, void *data)
-/* If PROG is a leftover, slay it with SIGKILL */
-static int
-cb_kill_prog (struct prog *prog, void *data)
-{
- if (prog_is_leftover (prog))
- prog_stop (prog, SIGKILL);
- return 0;
-}
-
-static int
-list_is_empty (void *p)
-{
- struct complist *list = p;
- return list->head == NULL;
-}
-
static int
@@ -506,3 +490,3 @@ component_config_commit (void)
- /* Terminate orphaned progs */
+ /* Mark orphaned progs for termination */
list = &comp_list[prev];
@@ -510,8 +494,4 @@ component_config_commit (void)
{
- progman_foreach (cb_terminate_prog, NULL);
- if (progman_wait_until (list_is_empty, list))
- {
- progman_foreach (cb_kill_prog, NULL);
- progman_wait_until (list_is_empty, list);
- }
+ progman_foreach (mark_prog, NULL);
+ pies_schedule_children (PIES_CHLD_GC);
}

Return to:

Send suggestions and report system problems to the System administrator.