From 57c7a107290173a64ae891d8d81a4674cf739c78 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 b57ee4c2c60..60e2797eb74 100644 --- a/source4/smbd/server.c +++ b/source4/smbd/server.c @@ -128,12 +128,10 @@ static void sig_term(int sig) * We're the process group leader, send * SIGTERM to our process group. */ - DEBUG(0,("SIGTERM: killing children\n")); kill(-getpgrp(), SIGTERM); } #endif - DEBUG(0,("Exiting pid %d on SIGTERM\n", (int)getpid())); - exit(127); + _exit(127); } static void sigterm_signal_handler(struct tevent_context *ev, -- 2.13.6