aboutsummaryrefslogtreecommitdiff
path: root/src/pies.h
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-10-16 00:05:23 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2009-10-16 01:16:12 +0300
commita0631c9ac2c13c3ef1db027a490620504a287d3f (patch)
tree5cc3c9d5b588974eee29d17c724dbdd8551dfdc8 /src/pies.h
parent9670b8cada0df307c6ffd9be1b14f5dfd51cc958 (diff)
downloadpies-a0631c9ac2c13c3ef1db027a490620504a287d3f.tar.gz
pies-a0631c9ac2c13c3ef1db027a490620504a287d3f.tar.bz2
Various improvements.
* configure.ac (AC_CHECK_FUNCS): Check for vsyslog. * src/diag.c (syslog_printer) [!HAVE_VSYSLOG]: call syslog. * src/pies.c (component_keywords): Remove settle-timeout, replace it with pass-fd-timeout. (main): Force syslog logging if !foreground. Do not close first three fds before restarting if log_to_stderr is set. * src/pies.h (DEFAULT_PASS_FD_TIMEOUT): New constant. (struct component): Replace settle_timeout with pass_fd_timeout. All uses changed. (pass_fd): Pass timeout as argument. * src/progman.c (prog_start): Remove hardcoded sleep before calling pass_fd. Update call to pass_fd. (prog_start_prerequisites): Remove handling of settle_timeout. * src/socket.c (open_unix_socket): Remove. (pass_fd): Rewrite. * doc/pies.texi: Update.
Diffstat (limited to 'src/pies.h')
-rw-r--r--src/pies.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/pies.h b/src/pies.h
index 751c2a2..9b8ee2d 100644
--- a/src/pies.h
+++ b/src/pies.h
@@ -61,6 +61,8 @@
#define SLEEPTIME 5*60
#define MAXSPAWN 10
+#define DEFAULT_PASS_FD_TIMEOUT 5
+
#define RETR_OUT 0
#define RETR_ERR 1
@@ -134,7 +136,7 @@ enum pies_comp_mode
struct component
{
- enum pies_comp_mode mode;
+ enum pies_comp_mode mode;
char *tag; /* Entry tag (for diagnostics purposes) */
char *program; /* Program name */
char **argv; /* Program command line */
@@ -142,8 +144,6 @@ struct component
char *dir; /* Working directory */
gl_list_t prereq; /* Prerequisites */
gl_list_t depend; /* Dependency targets */
- unsigned settle_timeout; /* Time needed for started prerequisites to
- settle */
/* FIXME: disabled and precious can be encoded as bits in mode */
int disabled; /* The componenet is disabled */
int precious; /* The component is precious (cannot be disabled) */
@@ -155,6 +155,8 @@ struct component
(if mode != pies_comp_exec) */
char *pass_fd_socket; /* Socket to pass fd on
(if mode == pies_comp_pass_fd) */
+ unsigned pass_fd_timeout; /* Maximum time to wait for pass_fd socket to
+ become available. */
pies_acl_t acl;
/* Redirectors: */
int facility; /* Syslog facility. */
@@ -239,7 +241,7 @@ const char * pies_url_get_arg (struct pies_url *url, const char *argname);
void pies_pause (void);
int register_listener (int fd);
-int pass_fd (const char *socket, int fd);
+int pass_fd (const char *socket, int fd, unsigned time_out);
int create_socket (struct pies_url *url, const char *user, mode_t umask);

Return to:

Send suggestions and report system problems to the System administrator.