- Included in:
Included Files
- #include <mplib1/mplib1_config.h>
- #include <mplib1/dl_list.h>
- #include <mplib1/bpo_lock.h>
- #include <mplib1/bpo_list.h>
- #include <sys/types.h>
- #include <stdio.h>
- #include <mplib1/bpo_init.h>
Preprocessor definitions
#define MPLIB1_WATCHDOG_H
#define WATCH_CTRL_Q "Watchdog Control Queue"
#define CTL_BUF_SZ 200
#define CTL_REP_SZ 200
#define PRG_HDR_DAEMON
#define PRG_HDR_BATCH
#define PRG_HDR_DAEMON_C 'D'
#define PRG_HDR_BATCH_C 'B'
#define LVL_HDR_C 'L'
- struct program_hdr
- {
- Node prg_Node;
- char* prg_name;
- char* grp_name;
- char* exe_name;
- char* opt_name;
- char* pid_name;
- char* env_name;
- char* out_name;
- char* err_name;
- int ptype;
- int level;
- int copies;
- int active;
- int track_by_pid;
- int startup;
- int sp_limit;
- int sp_hold;
- int sp_window;
- time_t pid_f_time;
- int lvl_exclude;
- int spawn_cnt;
- time_t spawn_time;
- time_t spawn_window;
- List mem_bits;
- List running_pids;
- int param1;
- int param2;
- void* ptr1;
- void* ptr2;
- char key[2];
- }
- struct level_hdr
- {
- Node lvl_hdr;
- int lower_level;
- int upper_level;
- int active;
- char key[2];
- }
- struct pid_track
- {
- Node pid_node;
- pid_t the_pid;
- char pid_str[PID_STR_LEN];
- int starting;
- int dying;
- time_t expire;
- struct program_hdr* pptr;
- int track_by_pid;
- }
- struct watchdog_ctrl_msg
- {
- struct bpo_Q_Mesg ctrl_msg;
- char comm_buf[200];
- char rep_buf[200];
- }
typedef int (*level_func_t)(const char*,char*,int)
typedef int (*prog_func_t)(const char*,char*,int,int)
typedef void (*prog_walk_t)(struct program_hdr*,void* param)
typedef void (*level_walk_t)(struct level_hdr*,void* param)