summaryrefslogtreecommitdiff
path: root/source3/lib/server_prefork_util.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2011-08-18 10:31:36 -0400
committerSimo Sorce <idra@samba.org>2011-08-21 09:05:06 -0400
commit7bb4b991a54c85e7ca9fcfd15f85a38940ce6dfe (patch)
treeb2b412989e17d73da40848715b9aee2bb607b5b0 /source3/lib/server_prefork_util.c
parentfeadd849ba6e36896cf38cada170ff53c4b03258 (diff)
downloadsamba-7bb4b991a54c85e7ca9fcfd15f85a38940ce6dfe.tar.gz
samba-7bb4b991a54c85e7ca9fcfd15f85a38940ce6dfe.tar.bz2
samba-7bb4b991a54c85e7ca9fcfd15f85a38940ce6dfe.zip
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 <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
Diffstat (limited to 'source3/lib/server_prefork_util.c')
-rw-r--r--source3/lib/server_prefork_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/server_prefork_util.c b/source3/lib/server_prefork_util.c
index 01c7994f60..3e14015c81 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);
}
}