From 7bb4b991a54c85e7ca9fcfd15f85a38940ce6dfe Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 18 Aug 2011 10:31:36 -0400 Subject: s3-prefork: Fix code to retire children We have to be more careful when retiring children. We cannot stop accepting connections as soon as the server tells us to quit because if max_children is reached and we still have clients connected, the server will not be able to spawn new children until one exits. And children will not exit until all the clients closed the connections. So we keep operating past our recall until we have 0 connections. Also do not try to recall children that still have >= 1 clients connected, they couldn't anyway. Also use messaging to warn children and not SIGHUP. Signed-off-by: Andreas Schneider Signed-off-by: Simo Sorce --- source3/lib/server_prefork_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/server_prefork_util.c') diff --git a/source3/lib/server_prefork_util.c b/source3/lib/server_prefork_util.c index 01c7994f601..3e14015c81e 100644 --- a/source3/lib/server_prefork_util.c +++ b/source3/lib/server_prefork_util.c @@ -102,7 +102,7 @@ void pfh_manage_pool(struct tevent_context *ev_ctx, n = total - cfg->min_children; } if (n >= 0) { - prefork_retire_children(pool, n, + prefork_retire_children(msg_ctx, pool, n, now - cfg->child_min_life); } } -- cgit