diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/comp.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -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 */ |