[SCM] Samba Shared Repository - branch v3-2-test updated -
release-3-2-0pre2-3622-ga062682
Karolin Seeger
kseeger at samba.org
Thu Jun 18 09:56:16 GMT 2009
The branch, v3-2-test has been updated
via a0626827c820cad082001ab76f1f7e37f1a7307b (commit)
from 8fdb612155e36980249b7dd0daf5c57fb4d80f8c (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit a0626827c820cad082001ab76f1f7e37f1a7307b
Author: Jeremy Allison <jra at samba.org>
Date: Thu Jun 18 11:53:52 2009 +0200
Fix bug #6476 - more then 3000 smbd-zombies in memory
We weren't reaping children in the [x]inetd case.
Jeremy.
(cherry picked from commit 7e51314f2e18241876b049642fcb133df7e44c70)
-----------------------------------------------------------------------
Summary of changes:
source/smbd/server.c | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/smbd/server.c b/source/smbd/server.c
index e914118..35c98aa 100644
--- a/source/smbd/server.c
+++ b/source/smbd/server.c
@@ -348,10 +348,6 @@ static bool open_sockets_smbd(bool is_daemon, bool interactive, const char *smb_
struct dns_reg_state * dns_reg = NULL;
unsigned dns_port = 0;
- if (!is_daemon) {
- return open_sockets_inetd();
- }
-
#ifdef HAVE_ATEXIT
{
static int atexit_set;
@@ -362,6 +358,17 @@ static bool open_sockets_smbd(bool is_daemon, bool interactive, const char *smb_
}
#endif
+ if (!is_daemon) {
+ /*
+ * Stop zombies the old way.
+ * We aren't forking any new
+ * 'normal' connections when
+ * run from [x]inetd.
+ */
+ CatchChild();
+ return open_sockets_inetd();
+ }
+
/* Stop zombies */
CatchSignal(SIGCLD, sig_cld);
@@ -1199,6 +1206,10 @@ extern void build_options(bool screen);
BlockSignals(False, SIGUSR1);
BlockSignals(False, SIGTERM);
+ /* Ensure we leave no zombies until we
+ * correctly set up child handling below. */
+ CatchChild();
+
/* we want total control over the permissions on created files,
so set our umask to 0 */
umask(0);
--
Samba Shared Repository
More information about the samba-cvs
mailing list