URL: https://github.com/SSSD/sssd/pull/548
Author: fidencio
 Title: #548: SERVER: Tone down shutdown messages for socket-activated 
responders
Action: opened

PR body:
"""
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.
"""

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/548/head:pr548
git checkout pr548
From df108ed90304e306e62c6f76068762303c511877 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fiden...@redhat.com>
Date: Tue, 3 Apr 2018 21:43:28 +0200
Subject: [PATCH] SERVER: Tone down shutdown messages for socket-activated
 responders
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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 <fiden...@redhat.com>
---
 src/util/server.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/util/server.c b/src/util/server.c
index 62e09314c..f34bf49f6 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);
     }
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org

Reply via email to