diff options
Diffstat (limited to 'src/pies.h')
-rw-r--r-- | src/pies.h | 38 |
1 files changed, 23 insertions, 15 deletions
@@ -106,3 +106,3 @@ struct action char *message; /* Notification mail. */ - char *command; /* Execute this command */ + char *command; /* Execute this command */ }; @@ -139,3 +139,10 @@ enum pies_comp_mode pies_comp_pass_fd, - + + /* Components of this type runs once on program startup. Running other + components is delayed until the last startup component finishes. */ + pies_comp_startup, + + /* FIXME: Runs before program termination */ + pies_comp_shutdown, + /* @@ -146,3 +153,3 @@ enum pies_comp_mode for its termination */ - pies_comp_wait = pies_mark_sysvinit, + pies_comp_wait = pies_mark_sysvinit, /* Execute the component once, when the specified runlevel is entered */ @@ -164,3 +171,3 @@ enum pies_comp_mode pressed the Ctrl+Alt+Del combination. */ - pies_comp_ctrlaltdel, + pies_comp_ctrlaltdel, /* Execute the component when a specified ondemand runlevel is called */ @@ -186,12 +193,12 @@ enum pies_comp_mode #define CF_PRECIOUS 0x002 /* The component is precious (should not - be disabled) */ + be disabled) */ #define CF_WAIT 0x004 /* Wait for the component instance to - terminate. */ + terminate. */ #define CF_TCPMUX 0x008 /* A plain TCPMUX service */ #define CF_TCPMUXPLUS 0x010 /* A TCPMUX-plus service, i.e. pies - must emit a '+' response before starting - it */ + must emit a '+' response before starting + it */ #define CF_INTERNAL 0x020 /* An internal inetd service */ #define CF_SOCKENV 0x040 /* Component wants socket information in - the environment */ + the environment */ #define CF_RESOLVE 0x080 /* Resolve IP addresses */ @@ -212,5 +219,5 @@ struct component size_t arridx; /* Index of this component. */ - size_t ref_count; /* Reference count. */ + size_t ref_count; /* Reference count. */ struct prog *prog; /* Prog associated with this component. */ - + enum pies_comp_mode mode; @@ -234,3 +241,3 @@ struct component char *runlevels; - + /* For inetd components */ @@ -255,5 +262,5 @@ struct component char *max_ip_connections_message; - + /* Redirectors: */ - int facility; /* Syslog facility. */ + int facility; /* Syslog facility. */ struct redirector redir[2]; /* Repeaters for stdout and stderr */ @@ -336,2 +343,3 @@ int pies_reread_config (void); void register_prog (struct component *comp); +void program_init_startup (void); int progman_waiting_p (void); @@ -596,3 +604,3 @@ struct sysvinit_request #define SYSV_ACCT_PROC_START 2 -#define SYSV_ACCT_PROC_STOP 3 +#define SYSV_ACCT_PROC_STOP 3 |