aboutsummaryrefslogtreecommitdiff
path: root/src/wydawca.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wydawca.h')
-rw-r--r--src/wydawca.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/wydawca.h b/src/wydawca.h
index 6384738..f093504 100644
--- a/src/wydawca.h
+++ b/src/wydawca.h
@@ -40,6 +40,7 @@
#include <arpa/inet.h>
#include <fcntl.h>
#include <time.h>
+#include <sysexits.h>
#include <mailutils/types.h>
#include <mailutils/url.h>
@@ -63,6 +64,8 @@
#define SP(s) ((s) ? (s) : "NONE")
+#define WYDAWCA_EX_AGAIN 1
+
/* The range of directive versions we accept (major * 100 + minor) */
#define MIN_DIRECTIVE_VERSION 101
#define MAX_DIRECTIVE_VERSION 101
@@ -319,6 +322,10 @@ extern char *admin_stat_message;
extern char *pidfile;
extern int force_startup;
+extern char *lockdir;
+extern time_t lock_expire_time;
+extern int enable_locking;
+
extern int daemon_mode;
extern time_t wakeup_interval;
extern int foreground;
@@ -364,8 +371,9 @@ enum exec_result wydawca_exec (int argc, const char **argv, int *retcode);
/* Directory scanning and registering */
-void scan_spool (const struct spool *spool, int uc, uid_t *uv);
-void scan_all_spools (int, uid_t *);
+int scan_spool (const struct spool *spool, int uc, uid_t *uv);
+int scan_all_spools (int, uid_t *);
+void spool_create_timers (void);
void register_spool (struct spool *spool);
struct spool *wydawca_find_spool (const char *name);
@@ -420,7 +428,7 @@ int process_directives (struct file_triplet *trp,
int enabled_spool_p (const struct spool *spool);
-int wydawca_uid (uid_t uid);
+int wydawca_set_uid (uid_t uid);
int parse_time_interval (const char *str, time_t *pint, const char **endp);
@@ -504,7 +512,20 @@ void job_queue_runner (void);
/* profile.c */
void check_pidfile (void);
+void remove_pidfile (void);
/* net.c */
void wydawca_listener (void);
+
+
+#define LOCK_OK 0
+#define LOCK_CONFLICT 1
+#define LOCK_RETRY 2
+#define LOCK_INVALID 3
+#define LOCK_FAILURE 4
+
+char *wydawca_lockname (const char *tag);
+int wydawca_lock (const char *lockname);
+void wydawca_unlock (const char *lockname);
+void wydawca_lock_init (void);

Return to:

Send suggestions and report system problems to the System administrator.