From: Volker Lendecke Date: Thu, 4 Jan 2018 20:06:02 +0000 (+0100) Subject: samba: Only use async signal-safe functions in signal handler X-Git-Tag: talloc-2.1.11~62 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=361ea743576cf125d7957a97ed78a0446dab1a19;p=thirdparty%2Fsamba.git samba: Only use async signal-safe functions in signal handler Otherwise shutdown can hang Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider --- diff --git a/source4/smbd/server.c b/source4/smbd/server.c index f650d80e873..adee3887d98 100644 --- a/source4/smbd/server.c +++ b/source4/smbd/server.c @@ -133,12 +133,10 @@ static void sig_term(int sig) * We're the process group leader, send * SIGTERM to our process group. */ - DBG_ERR("SIGTERM: killing children\n"); kill(-getpgrp(), SIGTERM); } #endif - DBG_ERR("Exiting pid %d on SIGTERM\n", (int)getpid()); - exit(127); + _exit(127); } static void sigterm_signal_handler(struct tevent_context *ev,