* `LICENSE' that comes with the fcron source distribution.
*/
- /* $Id: fcron.c,v 1.72 2005-02-26 15:11:32 thib Exp $ */
+ /* $Id: fcron.c,v 1.73 2005-03-12 12:39:21 thib Exp $ */
#include "fcron.h"
#include "socket.h"
#endif
-char rcs_info[] = "$Id: fcron.c,v 1.72 2005-02-26 15:11:32 thib Exp $";
+char rcs_info[] = "$Id: fcron.c,v 1.73 2005-03-12 12:39:21 thib Exp $";
void main_loop(void);
void check_signal(void);
explain("%s[%d] " VERSION_QUOTED " started", prog_name, daemon_pid);
-#ifdef _HPUX_SOURCE
- sigset(SIGTERM, sigterm_handler);
- sigset(SIGHUP, sighup_handler);
- sigset(SIGCHLD, sigchild_handler);
- sigset(SIGUSR1, sigusr1_handler);
- sigset(SIGUSR2, sigusr2_handler);
- sigset(SIGPIPE, SIG_IGN);
-#else
+#ifdef HAVE_SIGNAL
signal(SIGTERM, sigterm_handler);
signal(SIGHUP, sighup_handler);
siginterrupt(SIGHUP, 0);
siginterrupt(SIGUSR2, 0);
/* we don't want SIGPIPE to kill fcron, and don't need to handle it */
signal(SIGPIPE, SIG_IGN);
+#elif HAVE_SIGSET
+ sigset(SIGTERM, sigterm_handler);
+ sigset(SIGHUP, sighup_handler);
+ sigset(SIGCHLD, sigchild_handler);
+ sigset(SIGUSR1, sigusr1_handler);
+ sigset(SIGUSR2, sigusr2_handler);
+ sigset(SIGPIPE, SIG_IGN);
#endif
/* initialize job database */
if (sig_chld > 0) {
wait_chld();
sig_chld = 0;
-#ifndef _HPUX_SOURCE
+#ifdef HAVE_SIGNAL
(void)signal(SIGCHLD, sigchild_handler);
siginterrupt(SIGCHLD, 0);
#endif
/* update configuration */
synchronize_dir(".");
sig_conf = 0;
-#ifndef _HPUX_SOURCE
+#ifdef HAVE_SIGNAL
signal(SIGHUP, sighup_handler);
siginterrupt(SIGHUP, 0);
#endif
/* reload all configuration */
reload_all(".");
sig_conf = 0;
-#ifndef _HPUX_SOURCE
+#ifdef HAVE_SIGNAL
signal(SIGUSR1, sigusr1_handler);
siginterrupt(SIGUSR1, 0);
#endif
debug_opt = (debug_opt > 0)? 0 : 1;
explain("debug_opt = %d", debug_opt);
sig_debug = 0;
-#ifndef _HPUX_SOURCE
+#ifdef HAVE_SIGNAL
signal(SIGUSR2, sigusr2_handler);
siginterrupt(SIGUSR2, 0);
#endif