Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00035 #ifndef _PT_H
00036 #define _PT_H
00037
00038 #include <sys/types.h>
00039 #include <unistd.h>
00040 #include <stdlib.h>
00041
00042 #include "globals.h"
00043 #include "timer.h"
00044 #include "socket_info.h"
00045 #include "locking.h"
00046
00047 #define MAX_PT_DESC 128
00048
00049 struct process_table {
00050 int pid;
00051 #ifdef USE_TCP
00052 int unix_sock;
00053 int idx;
00054 #endif
00055 char desc[MAX_PT_DESC];
00056 };
00057
00058 extern struct process_table *pt;
00059 extern gen_lock_t* process_lock;
00060 extern int *process_count;
00061 extern int process_no;
00062
00063 extern struct tcp_child* tcp_children;
00064
00065 int init_pt(int proc_no);
00066 int get_max_procs(void);
00067 int register_procs(int no);
00068 int get_max_open_fds(void);
00069 int register_fds(int no);
00070
00071
00072 int close_extra_socks(int proc_id, int proc_no);
00073
00074 #define get_proc_no() ((process_count)?*process_count:0)
00075
00076
00077 int my_pid(void);
00078
00085 int fork_process(int child_id,char *desc,int make_sock);
00086
00094 #ifdef USE_TCP
00095 int fork_tcp_process(int child_id,char *desc,int r,int *reader_fd_1);
00096 #endif
00097
00098 #ifdef PKG_MALLOC
00099 void mem_dump_pkg_cb(str *gname, str *name);
00100 #endif
00101
00102 #ifdef SHM_MEM
00103 int mem_dump_shm_fixup(void *handle, str *gname, str *name, void **val);
00104 #endif
00105
00106 unsigned int set_fork_delay(unsigned int v);
00107
00108 #endif