r17836: Don't create zombies in the children, thanks to Jeremy!
authorVolker Lendecke <vlendec@samba.org>
Fri, 25 Aug 2006 19:13:37 +0000 (19:13 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:38:53 +0000 (11:38 -0500)
Volker
(This used to be commit c0767c08d01a429e1abf7205c14acec5e103ca91)

source3/smbd/server.c

index 460e2cc44bda9b4e543d6a21455f86a480425847..a7a84eced144cce0d74cc0ab1423ef10cde33c9b 100644 (file)
@@ -502,6 +502,10 @@ static BOOL open_sockets_smbd(BOOL is_daemon, BOOL interactive, const char *smb_
                            smbd_server_fd() != -1 &&
                            ((child = sys_fork())==0)) {
                                /* Child code ... */
+
+                               /* Stop zombies, the parent explicitly handles
+                                * them, counting worker smbds. */
+                               CatchChild();
                                
                                /* close the listening socket(s) */
                                for(i = 0; i < num_sockets; i++)