1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

Fix bug #6476 - more then 3000 smbd-zombies in memory

We weren't reaping children in the [x]inetd case.
Jeremy.
This commit is contained in:
Jeremy Allison 2009-06-17 13:56:21 -07:00
parent 57cd98de72
commit 7d20e8f7f4

View File

@ -1055,6 +1055,11 @@ 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);
@ -1221,6 +1226,13 @@ extern void build_options(bool screen);
/* close our standard file descriptors */
close_low_fds(False); /* Don't close stderr */
#ifdef HAVE_ATEXIT
atexit(killkids);
#endif
/* Stop zombies */
smbd_setup_sig_chld_handler();
smbd_process();
exit_server_cleanly(NULL);