]> granicus.if.org Git - fcron/blob - fcron.h
refactored suspend handling code into suspend.[ch]
[fcron] / fcron.h
1 /*
2  * FCRON - periodic command scheduler 
3  *
4  *  Copyright 2000-2014 Thibault Godouet <fcron@free.fr>
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2 of the License, or
9  *  (at your option) any later version.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  * 
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  * 
20  *  The GNU General Public License can also be found in the file
21  *  `LICENSE' that comes with the fcron source distribution.
22  */
23
24
25 #ifndef __FCRON_H__
26 #define __FCRON_H__
27
28 #include "global.h"
29 #include "mem.h"
30 #include "exe_list.h"
31 #include "lavg_list.h"
32 #include "fcronconf.h"
33
34 #ifdef HAVE_CRYPT_H
35 #include <crypt.h>
36 #endif
37
38 #ifdef HAVE_DIRENT_H
39 #include <dirent.h>
40 #elif HAVE_SYS_DIRENT_H
41 #include <sys/dirent.h>
42 #elif HAVE_SYS_DIR_H
43 #include <sys/dir.h>
44 #endif
45
46 #ifdef HAVE_FCNTL_H
47 #include <fcntl.h>
48 #endif
49
50 #include <grp.h>
51
52 #ifdef HAVE_SHADOW_H
53 #include <shadow.h>
54 #endif
55
56 #ifdef HAVE_SYS_IOCTL_H
57 #include <sys/ioctl.h>
58 #endif
59
60 #ifdef HAVE_SYS_TIME_H
61 #include <sys/time.h>
62 #endif
63
64 /* global variables */
65 extern time_t now;
66 extern char foreground;
67 extern char default_mail_charset[TERM_LEN];
68 extern time_t first_sleep;
69 extern char *cdir;
70 extern pid_t daemon_pid;
71 extern char *orig_tz_envvar;
72 extern mode_t saved_umask;
73 extern char *prog_name;
74 extern uid_t rootuid;
75 extern gid_t rootgid;
76 extern char sig_hup;
77 extern struct cf_t *file_base;
78 extern struct job_t *queue_base;
79 extern unsigned long int next_id;
80 extern struct cl_t **serial_array;
81 extern short int serial_array_size;
82 extern short int serial_array_index;
83 extern short int serial_num;
84 extern short int serial_running;
85 extern short int serial_max_running;
86 extern short int serial_queue_max;
87 extern short int lavg_queue_max;
88 extern exe_list_t *exe_list;
89 extern lavg_list_t *lavg_list;
90 extern short int lavg_serial_running;
91 /* end of global variables */
92
93
94 /* functions prototypes */
95
96 /* fcron.c */
97 extern void xexit(int exit_value);
98
99 #endif                          /* __FCRON_H */