s3:smbd: open_sockets_smbd() don't need a static variable arrount atexit()
authorStefan Metzmacher <metze@samba.org>
Thu, 8 Jan 2009 10:52:52 +0000 (11:52 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 8 Jan 2009 11:22:21 +0000 (12:22 +0100)
open_sockets_smbd() is only called once.

metze

source3/smbd/server.c

index a84b58a05287b72f4f828ede8b6bd7b1b65f486e..6241e96f77587972200224738a17b898862cfd5e 100644 (file)
@@ -360,13 +360,7 @@ static bool open_sockets_smbd(bool is_daemon, bool interactive, const char *smb_
        }
 
 #ifdef HAVE_ATEXIT
-       {
-               static int atexit_set;
-               if(atexit_set == 0) {
-                       atexit_set=1;
-                       atexit(killkids);
-               }
-       }
+       atexit(killkids);
 #endif
 
        /* Stop zombies */