aboutsummaryrefslogtreecommitdiff
path: root/src/comp.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2016-02-26 22:16:15 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2016-02-26 22:18:22 +0200
commit72b788de87b57b75eb2dd18040523857de1fb58c (patch)
tree0a19f715af69c94c2c1764118fb42b48d1cfe27d /src/comp.c
parentd52c1fb800ccd48fe82f08b5340ff2262f92869f (diff)
downloadpies-72b788de87b57b75eb2dd18040523857de1fb58c.tar.gz
pies-72b788de87b57b75eb2dd18040523857de1fb58c.tar.bz2
Improve previous commit.
* comp.c (mark_prog): Instead of calling progman_gc, terminate the prog if it is a deactivated listener.
Diffstat (limited to 'src/comp.c')
-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
@@ -366,3 +366,7 @@ prog_is_leftover (struct prog *prog)
-/* 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
@@ -371,3 +375,7 @@ 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;
@@ -507,3 +515,3 @@ component_config_commit (void)
progman_foreach (mark_prog, NULL);
- progman_gc ();
+ pies_schedule_children (PIES_CHLD_GC);
}

Return to:

Send suggestions and report system problems to the System administrator.