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)
committerKarolin Seeger <kseeger@samba.org>
Sun, 19 Oct 2014 21:19:37 +0000 (23:19 +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>
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Sun Oct 19 23:19:38 CEST 2014 on sn-devel-104

source3/nmbd/nmbd.c

index 36d908221f59490a3311894734e06f4306c592bd..9ea662c50f8a2566455bb8e0e412ab2b2970ff52 100644 (file)
@@ -883,6 +883,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;