print the signal handler messages only when debugging
This commit is contained in:
parent
fb1627ba90
commit
e7e51c3ef7
1 changed files with 3 additions and 3 deletions
|
@ -325,13 +325,13 @@ int main(int argc, char **argv)
|
||||||
static void signal_handler(int signal, gpointer data)
|
static void signal_handler(int signal, gpointer data)
|
||||||
{
|
{
|
||||||
if (signal == SIGUSR1) {
|
if (signal == SIGUSR1) {
|
||||||
fprintf(stderr, "Caught signal %d. Restarting.\n", signal);
|
ob_debug("Caught signal %d. Restarting.\n", signal);
|
||||||
ob_restart();
|
ob_restart();
|
||||||
} else if (signal == SIGUSR2) {
|
} else if (signal == SIGUSR2) {
|
||||||
fprintf(stderr, "Caught signal %d. Reconfiguring.\n", signal);
|
ob_debug("Caught signal %d. Reconfiguring.\n", signal);
|
||||||
ob_reconfigure();
|
ob_reconfigure();
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "Caught signal %d. Exiting.\n", signal);
|
ob_debug("Caught signal %d. Exiting.\n", signal);
|
||||||
/* TERM and INT return a 0 code */
|
/* TERM and INT return a 0 code */
|
||||||
ob_exit(!(signal == SIGTERM || signal == SIGINT));
|
ob_exit(!(signal == SIGTERM || signal == SIGINT));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue