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)
commit0caeda53d37740d18b38e6d37d0ecef8c6336820
tree52ca50fa644464ca50f1a6c14b83b8ce19b3d2d5
parentbc24603e41804a1d54ff85f9114f0288a03483fa
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().
(This used to be commit f2a9bbc317ba86ebe87c3ca27a3a0192de91014d)
source4/lib/socket/socket.c
source4/smbd/process_standard.c
source4/smbd/service.c