r3356: in the standard process model we need to make sure we close all
authorAndrew Tridgell <tridge@samba.org>
Fri, 29 Oct 2004 07:00:14 +0000 (07:00 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:05:00 +0000 (13:05 -0500)
commitf2a9bbc317ba86ebe87c3ca27a3a0192de91014d
tree3098cc268756f95349b8d01a85135ed6e22e6b59
parent84762a59763005f5d29106cd409867cb150d648f
r3356: in the standard process model we need to make sure we close all
listening sockets after the fork to prevent the child still listening
on incoming requests.

I have also added an optimisation where we use dup()/close() to lower
the file descriptor number of the new socket to the lowest possible
after closing our listening sockets. This keeps the max fd num passed
to select() low, which makes a difference to the speed of select().
source/lib/socket/socket.c
source/smbd/process_standard.c
source/smbd/service.c