aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/comp.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/comp.c b/src/comp.c
index c2e38b5..52913ac 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -364,12 +364,20 @@ prog_is_leftover (struct prog *prog)
return IS_COMPONENT (prog) && !component_is_active (prog->v.p.comp);
}
-/* If PROG is a leftover, mark it for termination */
+/* If PROG is a leftover, mark it for termination. If it is a listener,
+ terminate it immediately. This ensures that all decomissioned sockets
+ are closed before the subsequent call to progman_create_sockets, which
+ might need to reopen some of them.
+*/
static int
mark_prog (struct prog *prog, void *data)
{
if (prog_is_leftover (prog))
- prog->stop = 1;
+ {
+ prog->stop = 1;
+ if (prog->v.p.status == status_listener)
+ progman_stop_component (&prog);
+ }
return 0;
}
@@ -505,7 +513,7 @@ component_config_commit (void)
if (list->head)
{
progman_foreach (mark_prog, NULL);
- progman_gc ();
+ pies_schedule_children (PIES_CHLD_GC);
}
/* Build dependency map */

Return to:

Send suggestions and report system problems to the System administrator.