time_t next_hold; /* hold time for next crashing processes */
} *service_t;
-typedef struct class {
- char *class; /* name of class */
- int (*c_process_opt)(); /* function to processes options */
- void (*register_service)(); /* register the service if necessary */
- void (*c_check_service)(); /* check if anything needs to be done for a service */
- void (*init_state)(); /* copy state from old service struct to new */
- void (*copy_state)(); /* copy state from old service struct to new */
- void (*free_state)(); /* free class dependant state */
- void (*send_class)(); /* send class info */
- void (*disable_service)(); /* unregister service */
- void (*new_parent)(); /* in parent of new child */
- void (*new_child)(); /* in a new child */
- int (*prefork)(); /* just before fork */
-} *class_t;
-
typedef struct proc {
pid_t pid; /* pid of process */
service_t service;
int status; /* wait status if exit_time > 0 */
} *proc_t;
+typedef struct class {
+ char *class; /* name of class */
+ int (*c_process_opt)(service_t sv, char *opt); /* function to processes options */
+ void (*register_service)(service_t sv); /* register the service if necessary */
+ void (*c_check_service)(service_t sv); /* check if anything needs to be done for a service */
+ void (*init_state)(service_t to); /* copy state from old service struct to new */
+ void (*copy_state)(service_t to, service_t from);/* copy state from old service struct to new */
+ void (*free_state)(service_t sv); /* free class dependant state */
+ void (*send_class)(service_t sv); /* send class info */
+ void (*disable_service)(service_t sv); /* unregister service */
+ void (*new_parent)(service_t sv, proc_t p);/* in parent of new child */
+ void (*new_child)(service_t sv); /* in a new child */
+ int (*prefork)(service_t sv); /* just before fork */
+} *class_t;
+
typedef struct daemon_info { /* class specific info for class "daemon" */
int min_proc; /* minimum number of processes to have running */