From c0d5b6854ec50759aa4ae3f8c77e7ebb0e1ee450 Mon Sep 17 00:00:00 2001 From: lasers Date: Wed, 29 Aug 2018 09:11:54 -0500 Subject: [PATCH] conky.cc: quit on SIGHUP --- doc/docs.xml | 7 +++---- src/conky.cc | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/doc/docs.xml b/doc/docs.xml index 0633d483..ceccffd3 100644 --- a/doc/docs.xml +++ b/doc/docs.xml @@ -145,9 +145,8 @@ going to consume. An easy way to force Conky to reload your ~/.config/conky/conky.conf: - "killall -SIGUSR1 conky". Saves you the trouble of having - to kill and then restart. You can now also do the same with - SIGHUP. + "killall -SIGUSR1 conky". Saves you the trouble of having to kill + and then restart. @@ -173,7 +172,7 @@ Objects/Variables Colours are parsed using XParsecolor(), there might be a - list of them: /usr/share/X11/rgb.txt. + list of them: /usr/share/X11/rgb.txt. Colour can be also in #rrggbb format (hex). diff --git a/src/conky.cc b/src/conky.cc index ecb70818..464e61fe 100644 --- a/src/conky.cc +++ b/src/conky.cc @@ -2411,7 +2411,7 @@ static void main_loop() { if (g_sighup_pending != 0) { g_sighup_pending = 0; - NORM_ERR("received SIGHUP or SIGUSR1. reloading the config file."); + NORM_ERR("received SIGUSR1. reloading the config file."); reload_config(); } @@ -2432,7 +2432,7 @@ static void main_loop() { if (g_sigterm_pending != 0) { g_sigterm_pending = 0; - NORM_ERR("received SIGINT or SIGTERM to terminate. bye!"); + NORM_ERR("received SIGHUP, SIGINT, or SIGTERM to terminate. bye!"); terminate = 1; #ifdef BUILD_X11 if (out_to_x.get(*state)) { @@ -3185,11 +3185,11 @@ static void signal_handler(int sig) { * and do any signal processing there, NOT here */ switch (sig) { + case SIGHUP: case SIGINT: case SIGTERM: g_sigterm_pending = 1; break; - case SIGHUP: case SIGUSR1: g_sighup_pending = 1; break;