#include <sys/types.h>
#include <unistd.h>
#include "globals.h"
#include "timer.h"
#include "socket_info.h"


Go to the source code of this file.
Data Structures | |
| struct | process_table |
Defines | |
| #define | MAX_PT_DESC 128 |
Typedefs | |
| typedef void(* | forked_proc_func )(int i) |
Functions | |
| int | init_multi_proc_support (void) |
| Initialize multi process support. | |
| pid_t | internal_fork (char *proc_desc) |
| Wrapper around fork, do some initializations. | |
| static int | my_pid (void) |
| void | set_proc_attrs (char *fmt,...) |
| Set the process attributes. | |
Variables | |
| unsigned int | counted_processes |
| int | process_no |
| struct process_table * | pt |
Definition in file pt.h.
| #define MAX_PT_DESC 128 |
| typedef void(* forked_proc_func)(int i) |
| int init_multi_proc_support | ( | void | ) |
Initialize multi process support.
Definition at line 55 of file pt.c.
References children_no, count_module_procs(), count_timer_procs(), counted_processes, dont_fork, LM_ERR, socket_info::next, set_proc_attrs(), shm_malloc(), and udp_listen.
Referenced by main().
| pid_t internal_fork | ( | char * | proc_desc | ) |
Wrapper around fork, do some initializations.
Definition at line 137 of file pt.c.
References CHILD_COUNTER_STOP, is_main, LM_CRIT, LM_DBG, LM_ERR, process_table::pid, pid, process_no, seed_child(), set_proc_attrs(), and sockfd.
Referenced by main_loop(), start_module_procs(), and start_timer_processes().
| static int my_pid | ( | void | ) | [inline, static] |
return processes pid
Definition at line 67 of file pt.h.
References process_table::pid, and process_no.
Referenced by child_init(), child_init_callid(), dp_my_pid(), io_watch_add(), and warning_builder().
| void set_proc_attrs | ( | char * | fmt, | |
| ... | ||||
| ) |
Set the process attributes.
Definition at line 117 of file pt.c.
References MAX_PT_DESC, process_table::pid, process_no, and vsnprintf.
Referenced by init_multi_proc_support(), internal_fork(), and main_loop().
| unsigned int counted_processes |
variable keeping the number of created processes READONLY!!
Definition at line 49 of file pt.c.
Referenced by handle_sigs(), init_multi_proc_support(), kill_all_children(), and mi_ps().
| int process_no |
| struct process_table* pt |
array with children pids, 0= main proc, alloc'ed in shared mem if possible
Definition at line 46 of file pt.c.
Referenced by cleanup(), dispatch_actions(), handle_sigs(), kill_all_children(), main_loop(), mi_ps(), pdt_init_tree(), and pdt_mi_list().
1.5.6