From 519354d079731e673244a8e3851e5c5522d1b45e Mon Sep 17 00:00:00 2001 From: Fabiano FidĂȘncio Date: Apr 04 2018 08:44:37 +0000 Subject: SERVER: Tone down shutdown messages for socket-activated responders When dealing with socket-activated responders, those may be shut themselves down after some inactivy period. And that's completely normal and expected, thus should not be logged as an fatal error. For the case when the responder is started by the monitor, however, it still makes sense to keep the code as it is as the responders won't shut themselves down in any normal scenario. Signed-off-by: Fabiano FidĂȘncio Reviewed-by: Jakub Hrozek --- diff --git a/src/util/server.c b/src/util/server.c index 62e0931..f34bf49 100644 --- a/src/util/server.c +++ b/src/util/server.c @@ -248,8 +248,12 @@ void orderly_shutdown(int status) { #if HAVE_GETPGRP static int sent_sigterm; + int debug; + if (sent_sigterm == 0 && getpgrp() == getpid()) { - DEBUG(SSSDBG_FATAL_FAILURE, "SIGTERM: killing children\n"); + debug = is_socket_activated() ? SSSDBG_TRACE_INTERNAL + : SSSDBG_FATAL_FAILURE; + DEBUG(debug, "SIGTERM: killing children\n"); sent_sigterm = 1; kill(-getpgrp(), SIGTERM); }