From 2923d67a21543e6a68ad5b8a8f7368b861917b90 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 4 Jan 2018 21:06:02 +0100 Subject: [PATCH] samba: Only use async signal-safe functions in signal handler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise shutdown can hang Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider BUG: https://bugzilla.samba.org/show_bug.cgi?id=13240 Signed-off-by: Björn Baumbach (similar to commit 361ea743576cf125d7957a97ed78a0446dab1a19) --- source4/smbd/server.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source4/smbd/server.c b/source4/smbd/server.c index 407f258e8aa..80067e9e084 100644 --- a/source4/smbd/server.c +++ b/source4/smbd/server.c @@ -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); } /* -- 2.16.1