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:
parent
57cd98de72
commit
7d20e8f7f4
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user