From 09f9b4e02b0516e384f54c3a999233029caf66b8 Mon Sep 17 00:00:00 2001 From: hniksic Date: Thu, 30 Jun 2005 05:15:08 -0700 Subject: [PATCH] [svn] Check for both SIGUSR1 and SIGHUP before using them. --- src/ChangeLog | 4 ++++ src/main.c | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index bbe364c6..ca419b49 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-06-29 Hrvoje Niksic + + * main.c: Check for both SIGHUP and SIGUSR1 before using them. + 2005-06-29 Hrvoje Niksic * utils.c: Unconditionally include locale.h. diff --git a/src/main.c b/src/main.c index d05292a7..595efb2f 100644 --- a/src/main.c +++ b/src/main.c @@ -64,7 +64,9 @@ struct options opt; extern char *version_string; +#if defined(SIGHUP) || defined(SIGUSR1) static void redirect_output_signal (int); +#endif const char *exec_name; @@ -1002,6 +1004,15 @@ Can't timestamp and not clobber old files at the same time.\n")); } #if defined(SIGHUP) || defined(SIGUSR1) + +/* So the signal_name check doesn't blow when only one is available. */ +#ifndef SIGHUP +# define SIGHUP -1 +#endif +#ifndef SIGUSR1 +# define SIGUSR1 -1 +#endif + /* Hangup signal handler. When wget receives SIGHUP or SIGUSR1, it will proceed operation as usual, trying to write into a log file. If that is impossible, the output will be turned off. */ -- 2.39.2