]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
samba: Only use async signal-safe functions in signal handler
authorVolker Lendecke <vl@samba.org>
Thu, 4 Jan 2018 20:06:02 +0000 (21:06 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 20 Feb 2018 16:03:44 +0000 (17:03 +0100)
Otherwise shutdown can hang

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13240

Signed-off-by: Björn Baumbach <bb@sernet.de>
(similar to commit 361ea743576cf125d7957a97ed78a0446dab1a19)

Autobuild-User(v4-6-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-6-test): Tue Feb 20 17:03:44 CET 2018 on sn-devel-144

source4/smbd/server.c

index 407f258e8aa0e64e22ef840a019f9d2f920d992f..80067e9e08438a6901243ddd132e0613f2590c20 100644 (file)
@@ -112,13 +112,11 @@ static void sig_term(int sig)
 #if HAVE_GETPGRP
        static int done_sigterm;
        if (done_sigterm == 0 && getpgrp() == getpid()) {
-               DEBUG(0,("SIGTERM: killing children\n"));
                done_sigterm = 1;
                kill(-getpgrp(), SIGTERM);
        }
 #endif
-       DEBUG(0,("Exiting pid %d on SIGTERM\n", (int)getpid()));
-       exit(127);
+       _exit(127);
 }
 
 /*