* `LICENSE' that comes with the fcron source distribution.
*/
- /* $Id: fcron.c,v 1.25 2000-09-03 13:15:46 thib Exp $ */
+ /* $Id: fcron.c,v 1.26 2000-09-12 19:52:34 thib Exp $ */
#include "fcron.h"
-char rcs_info[] = "$Id: fcron.c,v 1.25 2000-09-03 13:15:46 thib Exp $";
+char rcs_info[] = "$Id: fcron.c,v 1.26 2000-09-12 19:52:34 thib Exp $";
void main_loop(void);
void check_signal(void);
void info(void);
void usage(void);
-void sighup_handler(int x);
-void sigterm_handler(int x);
-void sigchild_handler(int x);
-void sigusr1_handler(int x);
+RETSIGTYPE sighup_handler(int x);
+RETSIGTYPE sigterm_handler(int x);
+RETSIGTYPE sigchild_handler(int x);
+RETSIGTYPE sigusr1_handler(int x);
int parseopt(int argc, char *argv[]);
void get_lock(void);
/* command line options */
-char debug_opt = DEBUG; /* set to 1 if we are in debug mode */
-char foreground = FOREGROUND; /* set to 1 when we are on foreground, else 0 */
+#ifdef DEBUG
+char debug_opt = 1; /* set to 1 if we are in debug mode */
+#else
+char debug_opt = 0; /* set to 1 if we are in debug mode */
+#endif
+
+#ifdef FOREGROUND
+char foreground = 1; /* set to 1 when we are on foreground, else 0 */
+#else
+char foreground = 0; /* set to 1 when we are on foreground, else 0 */
+#endif
+
char *cdir = FCRONTABS; /* the dir where are stored users' fcrontabs */
/* process identity */
}
-void
+RETSIGTYPE
sigterm_handler(int x)
/* exit safely */
{
xexit(EXIT_OK);
}
-void
+RETSIGTYPE
sighup_handler(int x)
/* update configuration */
{
sig_conf = 1;
}
-void
+RETSIGTYPE
sigchild_handler(int x)
/* call wait_chld() to take care of finished jobs */
{
}
-void
+RETSIGTYPE
sigusr1_handler(int x)
/* reload all configurations */
{
explain("%s[%d] " VERSION " started", prog_name, daemon_pid);
- (void)signal(SIGTERM, sigterm_handler);
- (void)signal(SIGHUP, sighup_handler);
+ signal(SIGTERM, sigterm_handler);
+ signal(SIGHUP, sighup_handler);
siginterrupt(SIGHUP, 0);
- (void)signal(SIGCHLD, sigchild_handler);
+ signal(SIGCHLD, sigchild_handler);
siginterrupt(SIGCHLD, 0);
- (void)signal(SIGUSR1, sigusr1_handler);
+ signal(SIGUSR1, sigusr1_handler);
siginterrupt(SIGUSR1, 0);
* `LICENSE' that comes with the fcron source distribution.
*/
- /* $Id: fcrontab.c,v 1.13 2000-09-05 19:52:33 thib Exp $ */
+ /* $Id: fcrontab.c,v 1.14 2000-09-12 19:53:03 thib Exp $ */
/*
* The goal of this program is simple : giving a user interface to fcron
#include "fcrontab.h"
-char rcs_info[] = "$Id: fcrontab.c,v 1.13 2000-09-05 19:52:33 thib Exp $";
+char rcs_info[] = "$Id: fcrontab.c,v 1.14 2000-09-12 19:53:03 thib Exp $";
void info(void);
void usage(void);
char reinstall_opt = 0;
char ignore_prev = 0;
int file_opt = 0;
-char debug_opt = DEBUG;
+
+#ifdef DEBUG
+char debug_opt = 1; /* set to 1 if we are in debug mode */
+#else
+char debug_opt = 0; /* set to 1 if we are in debug mode */
+#endif
+
char *user = NULL;
uid_t uid = 0 ;
char *cdir = FCRONTABS;