From: Ralph Boehme Date: Tue, 5 Jul 2016 13:20:53 +0000 (+0200) Subject: smbd/cleanupd: use smbd_reinit_after_fork() X-Git-Tag: tdb-1.3.10~436 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3a0c16b08c7dcfe389fbc429aae734ff52c84166;p=thirdparty%2Fsamba.git smbd/cleanupd: use smbd_reinit_after_fork() Using smbd_reinit_after_fork() rather then reinit_after_fork() ensures am_parent is reset to NULL. Otherwise, when exiting for some reason, the inherited atexit handler killkids() calls kill(0,SIGTERM) terminating our whole process group including the main smbd. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12016 Signed-off-by: Ralph Boehme Reviewed-by: Volker Lendecke --- diff --git a/source3/smbd/server.c b/source3/smbd/server.c index cdcdcc25a2c..e68e0355b0f 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -478,7 +478,7 @@ static bool cleanupd_init(struct messaging_context *msg, bool interactive, close(up_pipe[0]); - status = reinit_after_fork(msg, ev, true, "cleanupd"); + status = smbd_reinit_after_fork(msg, ev, true, "cleanupd"); if (!NT_STATUS_IS_OK(status)) { DBG_WARNING("reinit_after_fork failed: %s\n", nt_errstr(status));