s3: nmbd: Ensure the main nmbd process doesn't create zombies.
authorJeremy Allison <jra@samba.org>
Tue, 23 Sep 2014 20:32:37 +0000 (13:32 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 30 Sep 2014 18:40:16 +0000 (20:40 +0200)
Use the same mechanism as setup for smbd and winbindd.

Fixes bug #10830 - nmbd can leave unreaped zombies.

https://bugzilla.samba.org/show_bug.cgi?id=10830

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
source3/nmbd/nmbd.c

index 50b18e5ea444afd7a5a1050efb00ae6230715c30..d883c0a55687156c7e90be8ea704d6856baf5cf4 100644 (file)
@@ -884,6 +884,9 @@ static bool open_sockets(bool isdaemon, int port)
        BlockSignals(True, SIGUSR2);
 #endif
 
+       /* Ignore children - no zombies. */
+       CatchChild();
+
        if ( opt_interactive ) {
                Fork = False;
                log_stdout = True;