s3-prefork: Fix code to retire children
authorSimo Sorce <idra@samba.org>
Thu, 18 Aug 2011 14:31:36 +0000 (10:31 -0400)
committerSimo Sorce <idra@samba.org>
Sun, 21 Aug 2011 13:05:06 +0000 (09:05 -0400)
commit7bb4b991a54c85e7ca9fcfd15f85a38940ce6dfe
treeb2b412989e17d73da40848715b9aee2bb607b5b0
parentfeadd849ba6e36896cf38cada170ff53c4b03258
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>
source3/lib/server_prefork.c
source3/lib/server_prefork.h
source3/lib/server_prefork_util.c