#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include "mem/shm_mem.h"
#include "socket_info.h"
#include "sr_module.h"
#include "dprint.h"
#include "timer.h"
#include "pt.h"

Go to the source code of this file.
Defines | |
| #define | CHILD_COUNTER_STOP 656565656 |
Functions | |
| int | init_multi_proc_support (void) |
| Initialize multi process support. | |
| pid_t | internal_fork (char *proc_desc) |
| Wrapper around fork, do some initializations. | |
| void | set_proc_attrs (char *fmt,...) |
| Set the process attributes. | |
Variables | |
| unsigned int | counted_processes = 0 |
| struct process_table * | pt = 0 |
Definition in file pt.c.
| #define CHILD_COUNTER_STOP 656565656 |
Referenced by internal_fork().
| 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().
| 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 = 0 |
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().
| struct process_table* pt = 0 |
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